Package org.apache.parquet.format.event
Class Consumers
java.lang.Object
org.apache.parquet.format.event.Consumers
Entry point for reading thrift in a streaming fashion
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceTo consume objects coming from a DelegatingFieldConsumerstatic classDelegates reading the field to TypedConsumers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncall onField on the resulting DelegatingFieldConsumer to handle individual fieldsstatic TypedConsumer.ListConsumerlistElementsOf(TypedConsumer consumer) To consume list elements one by onestatic <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>>
TypedConsumer.ListConsumerlistOf(Class<T> c, Consumers.Consumer<List<T>> consumer) To consume a list of elementsstatic <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>>
TypedConsumer.StructConsumerstruct(Class<T> c, Consumers.Consumer<T> consumer)
-
Constructor Details
-
Consumers
public Consumers()
-
-
Method Details
-
fieldConsumer
call onField on the resulting DelegatingFieldConsumer to handle individual fields- Returns:
- a new DelegatingFieldConsumer
-
listOf
public static <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>> TypedConsumer.ListConsumer listOf(Class<T> c, Consumers.Consumer<List<T>> consumer) To consume a list of elements- Type Parameters:
T- the type of the list content- Parameters:
c- the class of the list contentconsumer- the consumer that will receive the list- Returns:
- a ListConsumer that can be passed to the DelegatingFieldConsumer
-
listElementsOf
To consume list elements one by one- Parameters:
consumer- the consumer that will read the elements- Returns:
- a ListConsumer that can be passed to the DelegatingFieldConsumer
-
struct
public static <T extends org.apache.thrift.TBase<T,? extends org.apache.thrift.TFieldIdEnum>> TypedConsumer.StructConsumer struct(Class<T> c, Consumers.Consumer<T> consumer)
-