Package org.apache.parquet.proto
Class ProtoReadSupport<T extends com.google.protobuf.Message>
- java.lang.Object
-
- org.apache.parquet.hadoop.api.ReadSupport<T>
-
- org.apache.parquet.proto.ProtoReadSupport<T>
-
public class ProtoReadSupport<T extends com.google.protobuf.Message> extends ReadSupport<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.parquet.hadoop.api.ReadSupport
ReadSupport.ReadContext
-
-
Field Summary
Fields Modifier and Type Field Description static String
PB_CLASS
static String
PB_DESCRIPTOR
static String
PB_REQUESTED_PROJECTION
-
Fields inherited from class org.apache.parquet.hadoop.api.ReadSupport
PARQUET_READ_SCHEMA
-
-
Constructor Summary
Constructors Constructor Description ProtoReadSupport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ReadSupport.ReadContext
init(InitContext context)
RecordMaterializer<T>
prepareForRead(org.apache.hadoop.conf.Configuration configuration, Map<String,String> keyValueMetaData, MessageType fileSchema, ReadSupport.ReadContext readContext)
static void
setProtobufClass(org.apache.hadoop.conf.Configuration configuration, String protobufClass)
Set name of protobuf class to be used for reading data.static void
setRequestedProjection(org.apache.hadoop.conf.Configuration configuration, String requestedProjection)
-
Methods inherited from class org.apache.parquet.hadoop.api.ReadSupport
getSchemaForRead, getSchemaForRead, init
-
-
-
-
Field Detail
-
PB_REQUESTED_PROJECTION
public static final String PB_REQUESTED_PROJECTION
- See Also:
- Constant Field Values
-
PB_CLASS
public static final String PB_CLASS
- See Also:
- Constant Field Values
-
PB_DESCRIPTOR
public static final String PB_DESCRIPTOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
setRequestedProjection
public static void setRequestedProjection(org.apache.hadoop.conf.Configuration configuration, String requestedProjection)
-
setProtobufClass
public static void setProtobufClass(org.apache.hadoop.conf.Configuration configuration, String protobufClass)
Set name of protobuf class to be used for reading data. If no class is set, value from file header is used. Note that the value in header is present only if the file was written using parquet-protobuf project, it will fail otherwise.- Parameters:
configuration
- a configurationprotobufClass
- a fully-qualified protobuf class name
-
init
public ReadSupport.ReadContext init(InitContext context)
- Overrides:
init
in classReadSupport<T extends com.google.protobuf.Message>
-
prepareForRead
public RecordMaterializer<T> prepareForRead(org.apache.hadoop.conf.Configuration configuration, Map<String,String> keyValueMetaData, MessageType fileSchema, ReadSupport.ReadContext readContext)
- Specified by:
prepareForRead
in classReadSupport<T extends com.google.protobuf.Message>
-
-