Modules configuration
The enrichment modules are configured in a file called default-config.json
. This file is included in the JAR and looks like this:
{
"modules": [
{
"className": "com.digitalpebble.spruce.modules.ccf.Storage",
"config": {
"hdd_gb_coefficient": 0.65,
"ssd_gb_coefficient": 1.2
}
},
{
"className": "com.digitalpebble.spruce.modules.ccf.Networking",
"config": {
"network_coefficient": 0.001
}
},
{
"className": "com.digitalpebble.spruce.modules.boavizta.BoaviztAPIstatic"
},
{
"className": "com.digitalpebble.spruce.modules.ccf.PUE"
},
{
"className": "com.digitalpebble.spruce.modules.electricitymaps.AverageCarbonIntensity"
},
{
"className": "com.digitalpebble.spruce.modules.OperationalEmissions"
}
]
}
This determines which modules are used and in what order but also configures their behaviour. For instance, the default coefficient set for the ccf.Networking module is 0.001 kWh/Gb.
Change the configuration
In order to use a different configuration, for instance to replace a module with an other one, or change their configuration (like the network coefficient above), you simply need to write a json file with your changes and pass it as an argument to the Spark job with '-c'.