Java Code Examples for org.apache.parquet.column.ColumnWriteStore#getColumnWriter()

The following examples show how to use org.apache.parquet.column.ColumnWriteStore#getColumnWriter() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MessageColumnIO.java    From parquet-mr with Apache License 2.0 6 votes vote down vote up
public MessageColumnIORecordConsumer(ColumnWriteStore columns) {
  this.columns = columns;
  int maxDepth = 0;
  this.columnWriter = new ColumnWriter[MessageColumnIO.this.getLeaves().size()];

  for (PrimitiveColumnIO primitiveColumnIO : MessageColumnIO.this.getLeaves()) {
    ColumnWriter w = columns.getColumnWriter(primitiveColumnIO.getColumnDescriptor());
    maxDepth = Math.max(maxDepth, primitiveColumnIO.getFieldPath().length);
    columnWriter[primitiveColumnIO.getId()] = w;
    buildGroupToLeafWriterMap(primitiveColumnIO, w);
  }

  fieldsWritten = new FieldsMarker[maxDepth];
  for (int i = 0; i < maxDepth; i++) {
    fieldsWritten[i] = new FieldsMarker();
  }
  r = new int[maxDepth];
}
 
Example 2
Source File: ColumnWriter.java    From iceberg with Apache License 2.0 4 votes vote down vote up
public void setColumnStore(ColumnWriteStore columnStore) {
  this.columnWriter = columnStore.getColumnWriter(desc);
}
 
Example 3
Source File: ColumnWriter.java    From iceberg with Apache License 2.0 4 votes vote down vote up
public void setColumnStore(ColumnWriteStore columnStore) {
  this.columnWriter = columnStore.getColumnWriter(desc);
}