@Override public Void call() throws Exception {
  while (!processingComplete || blockletProcessingCount.get() > 0) {
    NodeHolder nodeHolder=null;
    try {
      nodeHolder=blockletDataHolder.get();
      if (null != nodeHolder) {
        dataWriter.writeBlockletData(nodeHolder);
      }
      blockletProcessingCount.decrementAndGet();
    }
 catch (    Throwable throwable) {
      if (!processingComplete || blockletProcessingCount.get() > 0) {
        producerExecutorService.shutdownNow();
        resetBlockletProcessingCount();
        throw new CarbonDataWriterException(throwable.getMessage());
      }
    }
 finally {
      semaphore.release();
    }
  }
  return null;
}

@ Override public Void call ( ) throws Exception { while ( ! processingComplete || blockletProcessingCount . get ( ) > 0 ) { NodeHolder nodeHolder = null ; try { nodeHolder = blockletDataHolder . get ( ) ; if ( null != nodeHolder ) { dataWriter . writeBlockletData ( nodeHolder ) ; } blockletProcessingCount . decrementAndGet ( ) ; } catch ( Throwable throwable ) { if ( ! processingComplete || blockletProcessingCount . get ( ) > 0 ) { producerExecutorService . shutdownNow ( ) ; resetBlockletProcessingCount ( ) ; throw new CarbonDataWriterException ( throwable . getMessage ( ) ) ; } } finally { semaphore . release ( ) ; } } return null ; }
computes a result , or throws an exception if unable to do so .
