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

    https://github.com/apache/storm/pull/2113#discussion_r120439921
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/topology/TopologyBuilder.java ---
    @@ -559,6 +565,23 @@ public T addConfigurations(Map<String, Object> conf) {
                 
_commons.get(_id).set_json_conf(mergeIntoJson(parseJson(currConf), conf));
                 return (T) this;
             }
    +        
    +        @SuppressWarnings("unchecked")
    +        @Override
    +        public T addSharedMemory(SharedMemory request) {
    +            SharedMemory found = _sharedMemory.get(request.get_name());
    +            if (found != null && !found.equals(request)) {
    +                throw new IllegalArgumentException("Cannot have multiple 
different shared memory regions with the same name");
    +            }
    +            _sharedMemory.put(request.get_name(), request);
    +            Set<String> mems = _componentToSharedMemory.get(_id);
    --- End diff --
    
    Nit: Could be shortened to `_componentToSharedMemory.computeIfAbsent(_id, 
HashSet::new)`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to