Github user Ethanlm commented on a diff in the pull request:
https://github.com/apache/storm/pull/2881#discussion_r229879326
--- Diff:
storm-server/src/main/java/org/apache/storm/daemon/supervisor/BasicContainer.java
---
@@ -607,6 +608,27 @@ protected String javaCmd(String cmd) {
return ret;
}
+ /**
+ * Extracting out to mock it for tests.
+ * @return true if on Linux.
+ */
+ protected boolean isOnLinux() {
+ return SystemUtils.IS_OS_LINUX;
+ }
+
+ private void prefixNumaPinningIfApplicable(String numaId, List<String>
commandList) {
+ if (numaId != null) {
+ if (isOnLinux()) {
+ commandList.add("numactl");
+ commandList.add("--i=" + numaId);
--- End diff --
sorry to keep beating you on this :D How about:
```
commandList.add(0, "numactl");
commandList.add(1, "--i=" + numaId);
```
since we want to add prefix to `commandList` no matter it's empty or not
---