Class DelegatingReadSupport<T>

  • Type Parameters:
    T - the Java class of objects created by this ReadSupport

    public class DelegatingReadSupport<T>
    extends ReadSupport<T>
    Helps composing read supports
    • Constructor Detail

      • DelegatingReadSupport

        public DelegatingReadSupport​(ReadSupport<T> delegate)
    • Method Detail

      • init

        public ReadSupport.ReadContext init​(InitContext context)
        Description copied from class: ReadSupport
        called in InputFormat.getSplits(org.apache.hadoop.mapreduce.JobContext) in the front end
        Overrides:
        init in class ReadSupport<T>
        Parameters:
        context - the initialisation context
        Returns:
        the readContext that defines how to read the file
      • prepareForRead

        public RecordMaterializer<T> prepareForRead​(org.apache.hadoop.conf.Configuration configuration,
                                                    Map<String,​String> keyValueMetaData,
                                                    MessageType fileSchema,
                                                    ReadSupport.ReadContext readContext)
        Description copied from class: ReadSupport
        called in RecordReader.initialize(org.apache.hadoop.mapreduce.InputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext) in the back end the returned RecordMaterializer will materialize the records and add them to the destination
        Specified by:
        prepareForRead in class ReadSupport<T>
        Parameters:
        configuration - the job configuration
        keyValueMetaData - the app specific metadata from the file
        fileSchema - the schema of the file
        readContext - returned by the init method
        Returns:
        the recordMaterializer that will materialize the records