You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by GitBox <gi...@apache.org> on 2020/04/01 19:11:33 UTC

[GitHub] [storm] govind-menon commented on a change in pull request #3237: STORM-3259: Adds NUMA awareness to enable worker pinning

govind-menon commented on a change in pull request #3237: STORM-3259: Adds NUMA awareness to enable worker pinning
URL: https://github.com/apache/storm/pull/3237#discussion_r401847401
 
 

 ##########
 File path: storm-client/src/jvm/org/apache/storm/utils/Utils.java
 ##########
 @@ -124,11 +124,47 @@
     private static String memoizedLocalHostnameString = null;
     public static final Pattern TOPOLOGY_KEY_PATTERN = Pattern.compile("^[\\w \\t\\._-]+$", Pattern.UNICODE_CHARACTER_CLASS);
 
+    public static final String NUMA_MEMORY_IN_MB = "numa.memory.mb";
+    public static final String NUMA_CORES = "numa.cores";
+    public static final String NUMA_PORTS = "numa.ports";
+    public static final String NUMA_GENERIC_RESOURCES_MAP = "numa.generic.resources.map";
+
     static {
         localConf = readStormConfig();
         serializationDelegate = getSerializationDelegate(localConf);
     }
 
+    /**
+     * Return supervisor numa configuration.
+     * @param stormConf stormConf
+     * @return getNumaMap
+     */
+    public static Map<String, Object> getNumaMap(Map<String, Object> stormConf) {
+        Object numa = stormConf.get(Config.SUPERVISOR_NUMA_META);
+        if (numa == null) {
+            return Collections.emptyMap();
+        }
+        return (Map<String, Object>) numa;
+    }
+
+    /**
+     * getNumaIdForPort.
 
 Review comment:
   https://issues.apache.org/jira/browse/STORM-3615

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services