parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java
public void endBlock() throws IOException {
    state = state.endBlock();
    LOG.debug("{}: end block", out.getPos());
    currentBlock.setRowCount(currentRecordCount);
    blocks.add(currentBlock);
    columnIndexes.add(currentColumnIndexes);
    offsetIndexes.add(currentOffsetIndexes);
    currentColumnIndexes = null;
    currentOffsetIndexes = null;
    currentBlock = null;
  }
public void endBlock() throws IOException {
    state = state.endBlock();
    LOG.debug("{}: end block", out.getPos());
    currentBlock.setRowCount(currentRecordCount);
    blocks.add(currentBlock);
    columnIndexes.add(currentColumnIndexes);
    offsetIndexes.add(currentOffsetIndexes);
    currentColumnIndexes = null;
    currentOffsetIndexes = null;
    currentBlock = null;
  }
ends a block once all column chunks have been written
@throws IOException if there is an error while writing