parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java
@Deprecated
  public void writeDataPage(
      int valueCount, int uncompressedPageSize,
      BytesInput bytes,
      Encoding rlEncoding,
      Encoding dlEncoding,
      Encoding valuesEncoding) throws IOException {
    state = state.write();
    // We are unable to build indexes without rowCount so skip them for this column
    offsetIndexBuilder = OffsetIndexBuilder.getNoOpBuilder();
    columnIndexBuilder = ColumnIndexBuilder.getNoOpBuilder();
    long beforeHeader = out.getPos();
    LOG.debug("{}: write data page: {} values", beforeHeader, valueCount);
    int compressedPageSize = (int)bytes.size();
    metadataConverter.writeDataPageV1Header(
        uncompressedPageSize, compressedPageSize,
        valueCount,
        rlEncoding,
        dlEncoding,
        valuesEncoding,
        out);
    long headerSize = out.getPos() - beforeHeader;
    this.uncompressedLength += uncompressedPageSize + headerSize;
    this.compressedLength += compressedPageSize + headerSize;
    LOG.debug("{}: write data page content {}", out.getPos(), compressedPageSize);
    bytes.writeAllTo(out);
    encodingStatsBuilder.addDataEncoding(valuesEncoding);
    currentEncodings.add(rlEncoding);
    currentEncodings.add(dlEncoding);
    currentEncodings.add(valuesEncoding);
  }
@Deprecated
  public void writeDataPage(
      int valueCount, int uncompressedPageSize,
      BytesInput bytes,
      Encoding rlEncoding,
      Encoding dlEncoding,
      Encoding valuesEncoding) throws IOException {
    state = state.write();
    // We are unable to build indexes without rowCount so skip them for this column
    offsetIndexBuilder = OffsetIndexBuilder.getNoOpBuilder();
    columnIndexBuilder = ColumnIndexBuilder.getNoOpBuilder();
    long beforeHeader = out.getPos();
    LOG.debug("{}: write data page: {} values", beforeHeader, valueCount);
    int compressedPageSize = (int)bytes.size();
    metadataConverter.writeDataPageV1Header(
        uncompressedPageSize, compressedPageSize,
        valueCount,
        rlEncoding,
        dlEncoding,
        valuesEncoding,
        out);
    long headerSize = out.getPos() - beforeHeader;
    this.uncompressedLength += uncompressedPageSize + headerSize;
    this.compressedLength += compressedPageSize + headerSize;
    LOG.debug("{}: write data page content {}", out.getPos(), compressedPageSize);
    bytes.writeAllTo(out);
    encodingStatsBuilder.addDataEncoding(valuesEncoding);
    currentEncodings.add(rlEncoding);
    currentEncodings.add(dlEncoding);
    currentEncodings.add(valuesEncoding);
  }
@ Deprecated public void writeDataPage ( int valueCount , int uncompressedPageSize , BytesInput bytes , Encoding rlEncoding , Encoding dlEncoding , Encoding valuesEncoding ) throws IOException { state = state . write ( ) ; // We are unable to build indexes without rowCount so skip them for this column offsetIndexBuilder = OffsetIndexBuilder . getNoOpBuilder ( ) ; columnIndexBuilder = ColumnIndexBuilder . getNoOpBuilder ( ) ; long beforeHeader = out . getPos ( ) ; LOG . debug ( "{}: write data page: {} values" , beforeHeader , valueCount ) ; int compressedPageSize = ( int ) bytes . size ( ) ; metadataConverter . writeDataPageV1Header ( uncompressedPageSize , compressedPageSize , valueCount , rlEncoding , dlEncoding , valuesEncoding , out ) ; long headerSize = out . getPos ( ) - beforeHeader ; this . uncompressedLength += uncompressedPageSize + headerSize ; this . compressedLength += compressedPageSize + headerSize ; LOG . debug ( "{}: write data page content {}" , out . getPos ( ) , compressedPageSize ) ; bytes . writeAllTo ( out ) ; encodingStatsBuilder . addDataEncoding ( valuesEncoding ) ; currentEncodings . add ( rlEncoding ) ; currentEncodings . add ( dlEncoding ) ; currentEncodings . add ( valuesEncoding ) ; }
writes a single page
@param valueCount count of values
@param uncompressedPageSize the size of the data once uncompressed
@param bytes the compressed data for the page without header
@param rlEncoding encoding of the repetition level
@param dlEncoding encoding of the definition level
@param valuesEncoding encoding of values
@throws IOException if there is an error while writing
writes a single page