private void close(boolean idleClosed) throws IOException, StageException {
    closeLock.writeLock().lock();
    LOG.debug("Path[{}] - Closing", filePath);
    try {
      throwIfIdleClosed();
      // If this was closed previously, just return
      if (isClosed()) {
        return;
      }

      if (generator != null) {
        generator.close();
      }

      this.idleClosed = idleClosed;
      // writers can never be null, except in tests
      if (idleClosed && outputStreamHelper != null) {
        //writers.release(this, false);
        outputStreamHelper.commitFile(filePath);
      }
    } finally {
      closeLock.writeLock().unlock();
      //Gracefully Shutdown the thread, so rename goes through without glitch.
      if (!idleClosed) {
        idleCloseExecutor.shutdown();
      }
    }
  }
private void close(boolean idleClosed) throws IOException, StageException {
    closeLock.writeLock().lock();
    LOG.debug("Path[{}] - Closing", filePath);
    try {
      throwIfIdleClosed();
      
      if (isClosed()) {
        return;
      }

      if (generator != null) {
        generator.close();
      }

      this.idleClosed = idleClosed;
      
      if (idleClosed && outputStreamHelper != null) {
        
        outputStreamHelper.commitFile(filePath);
      }
    } finally {
      closeLock.writeLock().unlock();
      
      if (!idleClosed) {
        idleCloseExecutor.shutdown();
      }
    }
  }
private void close ( boolean idleClosed ) throws IOException , StageException { closeLock . writeLock ( ) . lock ( ) ; LOG . debug ( "Path[{}] - Closing" , filePath ) ; try { throwIfIdleClosed ( ) ; // If this was closed previously, just return if ( isClosed ( ) ) { return ; } if ( generator != null ) { generator . close ( ) ; } this . idleClosed = idleClosed ; // writers can never be null, except in tests if ( idleClosed && outputStreamHelper != null ) { //writers.release(this, false); outputStreamHelper . commitFile ( filePath ) ; } } finally { closeLock . writeLock ( ) . unlock ( ) ; //Gracefully Shutdown the thread, so rename goes through without glitch. if ( ! idleClosed ) { idleCloseExecutor . shutdown ( ) ; } } }
Private Methods
Private Methods