in src/main/java/com/aliyun/emr/example/storm/benchmark/AbstractTopology.java [25:44]
public void init(String configFilepath, String properties) throws Exception {
InputStream in = new BufferedInputStream(new FileInputStream(configFilepath));
configure = new Properties();
configure.load(in);
if (! StringUtils.isBlank(properties)) {
Map<String, String> customProperty = new HashMap<>();
for (String item : properties.split(",")) {
String[] kv = item.split("=");
if (kv.length != 2) {
System.out.println("invalid property[" + item + "], pattern should be k1=v2,k2=v2...");
continue;
}
customProperty.put(kv[0], kv[1]);
}
configure.putAll(customProperty);
}
System.out.println("all configure: " + configure);
}