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

    https://github.com/apache/storm/pull/871#discussion_r44365638
  
    --- Diff: 
external/storm-hive/src/main/java/org/apache/storm/hive/bolt/HiveBolt.java ---
    @@ -87,7 +87,7 @@ public void prepare(Map conf, TopologyContext 
topologyContext, OutputCollector c
                     }
                 }
                 this.collector = collector;
    -            allWriters = new HashMap<HiveEndPoint,HiveWriter>();
    +            allWriters = new ConcurrentHashMap<HiveEndPoint,HiveWriter>();
    --- End diff --
    
    We are running heartbeat as separate timer thread. Every time we add a new 
HiveEndPoint, HiveWriter we add this to allWriters Map and heartbeat thread 
goes through all the values to call heartbeat method. To have the values 
visible  in both threads we need to make concurrent


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to