Package org.apache.parquet.format.event
Class EventBasedThriftReader
java.lang.Object
org.apache.parquet.format.event.EventBasedThriftReader
Event based reader for Thrift
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreadListContent(TypedConsumer.ListConsumer eventConsumer, org.apache.thrift.protocol.TList tList) reads the list content (elements) from the underlying protocol and passes the events to the list event consumervoidreadMapContent(TypedConsumer.MapConsumer eventConsumer, org.apache.thrift.protocol.TMap tMap) reads the map content (key values) from the underlying protocol and passes the events to the map event consumervoidreadMapEntry(byte keyType, TypedConsumer keyConsumer, byte valueType, TypedConsumer valueConsumer) reads a key-value pairvoidreadSetContent(TypedConsumer.SetConsumer eventConsumer, org.apache.thrift.protocol.TSet tSet) reads the set content (elements) from the underlying protocol and passes the events to the set event consumervoidreads a Struct from the underlying protocol and passes the field events to the FieldConsumervoidreads the content of a struct (fields) from the underlying protocol and passes the events to c
-
Constructor Details
-
EventBasedThriftReader
public EventBasedThriftReader(org.apache.thrift.protocol.TProtocol protocol) - Parameters:
protocol- the protocol to read from
-
-
Method Details
-
readStruct
reads a Struct from the underlying protocol and passes the field events to the FieldConsumer- Parameters:
c- the field consumer- Throws:
org.apache.thrift.TException- if any thrift related error occurs during the reading
-
readStructContent
reads the content of a struct (fields) from the underlying protocol and passes the events to c- Parameters:
c- the field consumer- Throws:
org.apache.thrift.TException- if any thrift related error occurs during the reading
-
readSetContent
public void readSetContent(TypedConsumer.SetConsumer eventConsumer, org.apache.thrift.protocol.TSet tSet) throws org.apache.thrift.TException reads the set content (elements) from the underlying protocol and passes the events to the set event consumer- Parameters:
eventConsumer- the consumertSet- the set descriptor- Throws:
org.apache.thrift.TException- if any thrift related error occurs during the reading
-
readMapContent
public void readMapContent(TypedConsumer.MapConsumer eventConsumer, org.apache.thrift.protocol.TMap tMap) throws org.apache.thrift.TException reads the map content (key values) from the underlying protocol and passes the events to the map event consumer- Parameters:
eventConsumer- the consumertMap- the map descriptor- Throws:
org.apache.thrift.TException- if any thrift related error occurs during the reading
-
readMapEntry
public void readMapEntry(byte keyType, TypedConsumer keyConsumer, byte valueType, TypedConsumer valueConsumer) throws org.apache.thrift.TException reads a key-value pair- Parameters:
keyType- the type of the keykeyConsumer- the consumer for the keyvalueType- the type of the valuevalueConsumer- the consumer for the value- Throws:
org.apache.thrift.TException- if any thrift related error occurs during the reading
-
readListContent
public void readListContent(TypedConsumer.ListConsumer eventConsumer, org.apache.thrift.protocol.TList tList) throws org.apache.thrift.TException reads the list content (elements) from the underlying protocol and passes the events to the list event consumer- Parameters:
eventConsumer- the consumertList- the list descriptor- Throws:
org.apache.thrift.TException- if any thrift related error occurs during the reading
-