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

    https://github.com/apache/storm/pull/653#discussion_r35777089
  
    --- Diff: 
external/storm-hive/src/main/java/org/apache/storm/hive/bolt/HiveBolt.java ---
    @@ -43,23 +43,25 @@
     import java.util.concurrent.Executors;
     import java.util.concurrent.TimeUnit;
     import java.util.concurrent.atomic.AtomicBoolean;
    +import java.util.concurrent.BlockingQueue;
    +import java.util.concurrent.LinkedBlockingQueue;
     import java.io.IOException;
     
     public class HiveBolt extends  BaseRichBolt {
         private static final Logger LOG = 
LoggerFactory.getLogger(HiveBolt.class);
         private OutputCollector collector;
         private HiveOptions options;
    -    private Integer currentBatchSize;
         private ExecutorService callTimeoutPool;
         private transient Timer heartBeatTimer;
         private Boolean kerberosEnabled = false;
         private AtomicBoolean timeToSendHeartBeat = new AtomicBoolean(false);
         private UserGroupInformation ugi = null;
         HashMap<HiveEndPoint, HiveWriter> allWriters;
    +    private BlockingQueue<Tuple> tupleBatch;
     
         public HiveBolt(HiveOptions options) {
             this.options = options;
    -        this.currentBatchSize = 0;
    +        tupleBatch = new LinkedBlockingQueue<Tuple>();
    --- End diff --
    
    I was trying to guard against any concurrency issues with that data 
structure.  I still have not mastered how storm components parallelize, so 
maybe this isn't needed?


---
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