Package org.apache.parquet.hadoop.api
Class WriteSupport<T>
java.lang.Object
org.apache.parquet.hadoop.api.WriteSupport<T>
- Type Parameters:
T- the type of the incoming records
- Direct Known Subclasses:
DelegatingWriteSupport,GroupWriteSupport
Abstraction to use with
ParquetOutputFormat to convert incoming records-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classInformation to be added in the file once all the records have been writtenstatic final classinformation to be persisted in the file -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalled once in the end after the last record was writtengetName()Called to get a name to identify the WriteSupport object model.abstract WriteSupport.WriteContextinit(org.apache.hadoop.conf.Configuration configuration) Deprecated.init(org.apache.parquet.conf.ParquetConfiguration configuration) called first in the taskabstract voidprepareForWrite(org.apache.parquet.io.api.RecordConsumer recordConsumer) This will be called once per row groupabstract voidcalled once per record
-
Constructor Details
-
WriteSupport
public WriteSupport()
-
-
Method Details
-
init
@Deprecated public abstract WriteSupport.WriteContext init(org.apache.hadoop.conf.Configuration configuration) Deprecated.overrideinit(ParquetConfiguration)insteadcalled first in the task- Parameters:
configuration- the job's configuration- Returns:
- the information needed to write the file
-
init
called first in the task- Parameters:
configuration- the job's configuration- Returns:
- the information needed to write the file
-
prepareForWrite
public abstract void prepareForWrite(org.apache.parquet.io.api.RecordConsumer recordConsumer) This will be called once per row group- Parameters:
recordConsumer- the recordConsumer to write to
-
write
called once per record- Parameters:
record- one record to write to the previously provided record consumer
-
getName
Called 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.
- Returns:
- a String name for file metadata.
-
finalizeWrite
called once in the end after the last record was written- Returns:
- information to be added in the file
-
init(ParquetConfiguration)instead