[ASTERIXDB-2260][CONF] Pass extension arguments through
Change-Id: I1f2332ee85316a452d6efe9967992b30bd605f5b
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2312
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Steven Jacobs <sjaco002@ucr.edu>
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java
index 7d3ada5..67ea33f 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java
@@ -29,7 +29,6 @@
import java.util.EnumMap;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -86,6 +85,7 @@
private transient SortedMap<Integer, List<IConfigurator>> configurators = new TreeMap<>();
private boolean configured;
private String versionString = "version undefined";
+ private transient Map<String, Set<Map.Entry<String, String>>> extensionOptions = new TreeMap();
public ConfigManager() {
this(null);
@@ -309,6 +309,7 @@
.parseSectionName(section.getParent() == null ? section.getName() : section.getParent().getName());
String node;
if (rootSection == Section.EXTENSION) {
+ extensionOptions.put(section.getName(), section.entrySet());
continue;
} else if (rootSection == Section.NC) {
node = section.getName().equals(section.getSimpleName()) ? null : section.getSimpleName();
@@ -472,6 +473,10 @@
}
}
});
+ extensionOptions.forEach((extension, options) -> {
+ options.forEach(option -> ini
+ .add(extension, option.getKey(), option.getValue()));
+ });
return ini;
}