Github user Ethanlm commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2881#discussion_r229878430
  
    --- 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);
    +                return;
    +            } else {
    +                // TODO : Add support for pinning on Windows host
    +                throw new RuntimeException("numactl pinning currently not 
supported on non-Linux hosts");
    --- End diff --
    
    Maybe `UnsupportedOperationException` is a better option. But I am fine 
with this.


---

Reply via email to