public void addDataToStore(Object[] row) throws CarbonDataWriterException {
  dataRows.add(row);
  this.entryCount++;
  if (this.entryCount == this.blockletSize) {
    try {
      semaphore.acquire();
      producerExecutorServiceTaskList.add(producerExecutorService.submit(new Producer(blockletDataHolder,dataRows,++writerTaskSequenceCounter)));
      blockletProcessingCount.incrementAndGet();
      processedDataCount+=entryCount;
      LOGGER.info("Total Number Of records added to store: " + processedDataCount);
      dataRows=new ArrayList<>(this.blockletSize);
      this.entryCount=0;
    }
 catch (    InterruptedException e) {
      LOGGER.error(e,e.getMessage());
      throw new CarbonDataWriterException(e.getMessage());
    }
  }
}

public void addDataToStore ( Object [ ] row ) throws CarbonDataWriterException { dataRows . add ( row ) ; this . entryCount ++ ; if ( this . entryCount == this . blockletSize ) { try { semaphore . acquire ( ) ; producerExecutorServiceTaskList . add ( producerExecutorService . submit ( new Producer ( blockletDataHolder , dataRows , ++ writerTaskSequenceCounter ) ) ) ; blockletProcessingCount . incrementAndGet ( ) ; processedDataCount += entryCount ; LOGGER . info ( "Total Number Of records added to store: " + processedDataCount ) ; dataRows = new ArrayList < > ( this . blockletSize ) ; this . entryCount = 0 ; } catch ( InterruptedException e ) { LOGGER . error ( e , e . getMessage ( ) ) ; throw new CarbonDataWriterException ( e . getMessage ( ) ) ; } } }
below method will be used to add row to store
