Github user Ethanlm commented on a diff in the pull request:
https://github.com/apache/storm/pull/2881#discussion_r229880617
--- 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 --
Thanks for adding this. Do we care about duplicate cores across the numa
zones? (I don't
for example.
```
numaid=0, cores=[0,1,2,3]
numaid=1, cores=[0,1,2,3]
```
---