Package org.apache.parquet.hadoop.api
Class DelegatingWriteSupport<T>
- java.lang.Object
-
- org.apache.parquet.hadoop.api.WriteSupport<T>
-
- org.apache.parquet.hadoop.api.DelegatingWriteSupport<T>
-
- Type Parameters:
T- the Java class of objects written with this WriteSupport
public class DelegatingWriteSupport<T> extends WriteSupport<T>
Helps composing write supports
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.parquet.hadoop.api.WriteSupport
WriteSupport.FinalizedWriteContext, WriteSupport.WriteContext
-
-
Constructor Summary
Constructors Constructor Description DelegatingWriteSupport(WriteSupport<T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WriteSupport.FinalizedWriteContextfinalizeWrite()called once in the end after the last record was writtenStringgetName()Called to get a name to identify the WriteSupport object model.WriteSupport.WriteContextinit(org.apache.hadoop.conf.Configuration configuration)called first in the taskvoidprepareForWrite(RecordConsumer recordConsumer)This will be called once per row groupStringtoString()voidwrite(T record)called once per record
-
-
-
Constructor Detail
-
DelegatingWriteSupport
public DelegatingWriteSupport(WriteSupport<T> delegate)
-
-
Method Detail
-
init
public WriteSupport.WriteContext init(org.apache.hadoop.conf.Configuration configuration)
Description copied from class:WriteSupportcalled first in the task- Specified by:
initin classWriteSupport<T>- Parameters:
configuration- the job's configuration- Returns:
- the information needed to write the file
-
prepareForWrite
public void prepareForWrite(RecordConsumer recordConsumer)
Description copied from class:WriteSupportThis will be called once per row group- Specified by:
prepareForWritein classWriteSupport<T>- Parameters:
recordConsumer- the recordConsumer to write to
-
write
public void write(T record)
Description copied from class:WriteSupportcalled once per record- Specified by:
writein classWriteSupport<T>- Parameters:
record- one record to write to the previously provided record consumer
-
getName
public String 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<T>- Returns:
- a String name for file metadata.
-
finalizeWrite
public WriteSupport.FinalizedWriteContext finalizeWrite()
Description copied from class:WriteSupportcalled once in the end after the last record was written- Overrides:
finalizeWritein classWriteSupport<T>- Returns:
- information to be added in the file
-
-