hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/ChunkGroupOutputStream.java
@Override
  public synchronized void close() throws IOException {
    if (closed) {
      return;
    }
    closed = true;
    for (ChunkOutputStreamEntry entry : streamEntries) {
      if (entry != null) {
        entry.close();
      }
    }
    if (keyArgs != null) {
      // in test, this could be null
      keyArgs.setDataSize(byteOffset);
      ksmClient.commitKey(keyArgs, openID);
    } else {
      LOG.warn("Closing ChunkGroupOutputStream, but key args is null");
    }
  }
/**
   * Commit the key to KSM, this will add the blocks as the new key blocks.
   *
   * @throws IOException
   */
Commit the key to KSM, this will add the blocks as the new key blocks.
Commit the key to KSM this will add the blocks as the new key blocks .
@Override
  public synchronized void close() throws IOException {
    if (closed) {
      return;
    }
    closed = true;
    for (ChunkOutputStreamEntry entry : streamEntries) {
      if (entry != null) {
        entry.close();
      }
    }
    if (keyArgs != null) {
      keyArgs.setDataSize(byteOffset);
      ksmClient.commitKey(keyArgs, openID);
    } else {
      LOG.warn("Closing ChunkGroupOutputStream, but key args is null");
    }
  }
@ Override public synchronized void close ( ) throws IOException { if ( closed ) { return ; } closed = true ; for ( ChunkOutputStreamEntry entry : streamEntries ) { if ( entry != null ) { entry . close ( ) ; } } if ( keyArgs != null ) { keyArgs . setDataSize ( byteOffset ) ; ksmClient . commitKey ( keyArgs , openID ) ; } else { LOG . warn ( "Closing ChunkGroupOutputStream, but key args is null" ) ; } }
Commit the key to KSM, this will add the blocks as the new key blocks.
Commit the key to KSM this will add the blocks as the new key blocks .
// in test, this could be null