Github user govind-menon commented on a diff in the pull request:
https://github.com/apache/storm/pull/2881#discussion_r229883970
--- Diff:
storm-client/src/jvm/org/apache/storm/validation/ConfigValidation.java ---
@@ -414,6 +418,34 @@ public void validateInteger(String name, Object o) {
}
}
+ public static class NumaEntryValidator extends Validator {
+
+ @Override
+ public void validateField(String name, Object o) {
+ if (o == null) {
+ return;
+ }
+ Map numa = (Map<String, Object>) o;
+ for (String key : new String[]{NUMA_CORES, NUMA_MEMORY_IN_MB,
NUMA_PORTS}) {
+ if (!numa.containsKey(key)) {
+ throw new IllegalArgumentException(
+ "The numa configuration key [" + key + "] is
missing!"
+ );
+ }
+ }
+
+ List<Integer> cores = (List<Integer>) numa.get(NUMA_CORES);
+ Set coreSet = new HashSet();
+ coreSet.addAll(cores);
+ if (coreSet.size() != cores.size()) {
--- End diff --
We don't - the only reason I'm even keeping the core list as opposed to
number of cores is if in the future users wanted even more fine grained control
of core pinning. In that case duplicates would mean they wanted the core to be
used by multiple node
---