code: private synchronized COSDataBlocks.DataBlock createBlockIfNeeded() throws IOException {
      if (activeBlock == null) {
        blockCount++;
        if (blockCount >= COSConstants.MAX_MULTIPART_COUNT) {
          LOG.error("Number of partitions in stream exceeds limit for S3: "
              + COSConstants.MAX_MULTIPART_COUNT
              + " write may fail.");
        }
        activeBlock = blockFactory.create(key, blockCount, blockSize);
      }
      return activeBlock;
    }
docs: Demand create a destination block.
  
  @return the active block; null if there isn't one
  @throws IOException on any failure to create