Github user ajantha-bhat commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2646#discussion_r211914760
  
    --- Diff: 
processing/src/main/java/org/apache/carbondata/processing/loading/iterator/CarbonOutputIteratorWrapper.java
 ---
    @@ -45,17 +45,21 @@
     
       private RowBatch readBatch;
     
    +  private static Object lockObject = new Object();
    +
       private ArrayBlockingQueue<RowBatch> queue = new 
ArrayBlockingQueue<>(10);
     
       public void write(Object[] row) throws InterruptedException {
         if (close) {
           // already might be closed forcefully
           return;
         }
    -    if (!loadBatch.addRow(row)) {
    -      loadBatch.readyRead();
    -      queue.put(loadBatch);
    -      loadBatch = new RowBatch(batchSize);
    +    synchronized (lockObject) {
    --- End diff --
    
    if used 'this', findbugs thinks I need to synchronize hasNext() and close() 
method also. It says inconsistent synchronization.  Hence to avoid that this 
variable.



---

Reply via email to