Documentation > Development > Adding Configuration Properties

The H-Store configuration file is managed at runtime by HStoreConf. This file contains all of the configuration properties that are used when the H-Store system is deployed. These instructions are for how to add new properties to the system. To add a new parameter, one first must decide whether it is a global, client, or site property.

  • global: These are the configuration parameters that are global to either the sites or the clients.
  • client: Configuration parameters that affect the execution behavior of clients during a benchmark run.
  • site: Configuration parameters that affect the execution behavior of each HStoreSite.

In this example, we’ll assume that we want to add a new boolean site parameter called my_new_parameter. That means in HStoreConf, under the Site configuration class, we will add in a new data member:

@ConfigProperty(
    description="Describe what this parameter does.",
    defaultBoolean=true,
    experimental=false
)
public boolean my_new_parameter;

The @ConfigProperty annotation is used to provide additional information about the new parameter. The description field is used to provide additional information about what the configuration property is used for. The experimental flag is warning to other users as to whether this parameter is only used for research experiments and should not be changed without understanding what the affects are first. The default field defines what the default value of the parameter is if the administrator does not provide one. You must used the proper default field name based on whether the value of configuration parameter is a boolean (defaultBoolean), an integer (defaultInt), a long (defaultLong), a double (defaultDouble), or a string (defaultString). If the default value of a string should be null, you can use set defaultNull field to true.

Once the new property is added and the code compiles successfully, you must execute the following command to update build-common.xml. This file contains all of the properties that can be passed in from the command-line. The hstore-dist command will automatically pick out the name of the parameter and add it to build-common.xml.

ant compile hstore-dist

Now you can pass your configuration property from the command-line when you deploy H-Store:

ant hstore-benchmark -Dproject=tpcc -Dsite.my_new_parameter=true