Class VeniceConfigLoader

java.lang.Object
com.linkedin.davinci.config.VeniceConfigLoader

public class VeniceConfigLoader extends Object
VeniceConfigService loads the static configuration that does not change once the Server is started. Modifying these configs once the server is up and running, does not get reflected until the server is restarted. There are 3 configurations provided. 1) Cluster Configuration The configuration that needs to be shared between the Controller and Server goes here. 2) Server Configuration Multiple nodes that should share the same value should go in here. Cluster Name, ZooKeeper Address or any other configuration that is common between many storage nodes go here. 3) Override Configuration These value override the values in Base Configuration ( if present). Node Id for each server goes here. There are two types of overrides supported. 1) Precedence among the files Any Key in Server Configuration overrides the same key in Cluster Configuration. Any Key in Override Configuration overrides the same key in Server Configuration. 2) Overriding keys for specific store only. The following config sets default to all stores and override for foobar store. bdb.max.logfile.size=1000 store-foobar.bdb.max.logfile.size=5000 There are two ways of providing the Configs. 1) Config directory. The Config uses 3 files cluster.properties, server.properties and server-override.properties (optional). 2) java.util.properties. It takes in 3 props for the above 3 configuration. The static config initializes the config and starts the default services. The configuration does not specify what stores Storage Node hosts/serves. The Storage Node waits for Commands from Helix to understand what stores and partitions it was assigned to. This design, assumes that without Helix, the storage node/server will not be able to read/write data as it has no knowledge of the stores. Helix Controller may also provide dynamic properties that can override the properties at the store level. This is not implemented currently. There is no validation in the code, to differentiate between Valid and Invalid Overrides for now. Once the code is evolved and our usage patterns are narrowed down, checks can be enforced if necessary.