Class Consumers

java.lang.Object
org.apache.parquet.format.event.Consumers

public class Consumers extends Object
Entry point for reading thrift in a streaming fashion
  • Constructor Details

    • Consumers

      public Consumers()
  • Method Details

    • fieldConsumer

      public static Consumers.DelegatingFieldConsumer 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 content
      consumer - the consumer that will receive the list
      Returns:
      a ListConsumer that can be passed to the DelegatingFieldConsumer
    • listElementsOf

      public static TypedConsumer.ListConsumer listElementsOf(TypedConsumer consumer)
      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)