Class GroupWriteSupport
java.lang.Object
org.apache.parquet.hadoop.api.WriteSupport<org.apache.parquet.example.data.Group>
org.apache.parquet.hadoop.example.GroupWriteSupport
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.parquet.hadoop.api.WriteSupport
WriteSupport.FinalizedWriteContext, WriteSupport.WriteContext -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Called to get a name to identify the WriteSupport object model.static org.apache.parquet.schema.MessageTypegetSchema(org.apache.hadoop.conf.Configuration configuration) static org.apache.parquet.schema.MessageTypegetSchema(org.apache.parquet.conf.ParquetConfiguration configuration) init(org.apache.hadoop.conf.Configuration configuration) called first in the taskinit(org.apache.parquet.conf.ParquetConfiguration configuration) called first in the taskvoidprepareForWrite(org.apache.parquet.io.api.RecordConsumer recordConsumer) This will be called once per row groupstatic voidsetSchema(org.apache.parquet.schema.MessageType schema, org.apache.hadoop.conf.Configuration configuration) voidwrite(org.apache.parquet.example.data.Group record) called once per recordMethods inherited from class org.apache.parquet.hadoop.api.WriteSupport
finalizeWrite
-
Field Details
-
PARQUET_EXAMPLE_SCHEMA
- See Also:
-
-
Constructor Details
-
GroupWriteSupport
public GroupWriteSupport()
-
-
Method Details
-
setSchema
public static void setSchema(org.apache.parquet.schema.MessageType schema, org.apache.hadoop.conf.Configuration configuration) -
getSchema
public static org.apache.parquet.schema.MessageType getSchema(org.apache.hadoop.conf.Configuration configuration) -
getSchema
public static org.apache.parquet.schema.MessageType getSchema(org.apache.parquet.conf.ParquetConfiguration configuration) -
getName
Description copied from class:WriteSupportCalled to get a name to identify the WriteSupport object model. If not null, this is added to the file footer metadata.Defining this method will be required in a future API version.
- Overrides:
getNamein classWriteSupport<org.apache.parquet.example.data.Group>- Returns:
- a String name for file metadata.
-
init
Description copied from class:WriteSupportcalled first in the task- Specified by:
initin classWriteSupport<org.apache.parquet.example.data.Group>- Parameters:
configuration- the job's configuration- Returns:
- the information needed to write the file
-
init
Description copied from class:WriteSupportcalled first in the task- Overrides:
initin classWriteSupport<org.apache.parquet.example.data.Group>- Parameters:
configuration- the job's configuration- Returns:
- the information needed to write the file
-
prepareForWrite
public void prepareForWrite(org.apache.parquet.io.api.RecordConsumer recordConsumer) Description copied from class:WriteSupportThis will be called once per row group- Specified by:
prepareForWritein classWriteSupport<org.apache.parquet.example.data.Group>- Parameters:
recordConsumer- the recordConsumer to write to
-
write
public void write(org.apache.parquet.example.data.Group record) Description copied from class:WriteSupportcalled once per record- Specified by:
writein classWriteSupport<org.apache.parquet.example.data.Group>- Parameters:
record- one record to write to the previously provided record consumer
-