in src/main/java/com/amazonaws/services/kinesis/scaling/auto/AutoscalingController.java [68:93]
public static AutoscalingController getInstance() throws InvalidConfigurationException {
if (controller != null) {
return controller;
} else {
String configPath = System.getProperty(CONFIG_URL_PARAM);
if (configPath != null && !configPath.equals("")) {
LOG.info("Starting Kinesis Autoscaling Agent");
try {
// read the json config into an array of autoscaling
// configurations
AutoscalingConfiguration[] config = AutoscalingConfiguration.loadFromURL(configPath);
controller = getInstance(config);
} catch (Exception e) {
handleFatal(e);
}
} else {
throw new InvalidConfigurationException(String.format(
"Unable to instantiate AutoscalingController without System Property %s", CONFIG_URL_PARAM));
}
return controller;
}
}