-
Notifications
You must be signed in to change notification settings - Fork 103
Configuration
NDBench leverages Guice to reduce repetition and in favor of a more readable configuration. The registration of the listener takes place in the web.xml. InjectedWebListener is the logical place where the injectors are created and configured.
bind(IConfiguration.class).to(NdBenchConfiguration.class);
bind(NdBenchMonitor.class).to(FakeMonitor.class);
bind(IClusterDiscovery.class).to(LocalClusterDiscovery.class);
bind(DataGenerator.class).to(StringDataGenerator.class);
To use NDBench on AWS, you need to replace LocalClusterDiscovery
with AWSLocalClusterDiscovery
.
Configuration Package provides a variety of properties which can be used to configure NDBench
PropertiesConfigSource class reads properties from "NdBench.properties" and reads all the properties provided in configuration.
System Properties class reads properties from "System.getProperties()" and reads all the properties provided.
Properties Interface This interface is a placeholder for all the methods related to configuration.
Properties Implementor This class implements above interface and also provides default properties to use.
Properties inherently use Archaius configuration.
But you can use any of the above methods to supply properties whichever way you would like. (eg. NdBench.properties or System properties)
Another way to provide your properties is by implementing IConfiguration interface.