类 HdfsSequentialTextSink

  • 所有已实现的接口:
    java.lang.AutoCloseable, org.apache.pulsar.io.core.Sink<java.lang.String>

    public class HdfsSequentialTextSink
    extends HdfsAbstractSequenceFileSink<java.lang.Long,​java.lang.String,​org.apache.hadoop.io.LongWritable,​org.apache.hadoop.io.Text>
    This Sink should be used when the records are originating from a sequential source, and we want to retain the record sequence.This class uses the record's sequence id as the sequence id in the HDFS Sequence File if it is available, if not a sequence id is auto-generated for each new record.
    • 构造器详细资料

      • HdfsSequentialTextSink

        public HdfsSequentialTextSink()
    • 方法详细资料

      • getWriter

        public org.apache.hadoop.io.SequenceFile.Writer getWriter()
                                                           throws java.io.IOException
        覆盖:
        getWriter 在类中 HdfsAbstractSequenceFileSink<java.lang.Long,​java.lang.String,​org.apache.hadoop.io.LongWritable,​org.apache.hadoop.io.Text>
        抛出:
        java.io.IOException
      • getOptions

        protected java.util.List<org.apache.hadoop.io.SequenceFile.Writer.Option> getOptions()
                                                                                      throws java.lang.IllegalArgumentException,
                                                                                             java.io.IOException
        覆盖:
        getOptions 在类中 HdfsAbstractSequenceFileSink<java.lang.Long,​java.lang.String,​org.apache.hadoop.io.LongWritable,​org.apache.hadoop.io.Text>
        抛出:
        java.lang.IllegalArgumentException
        java.io.IOException
      • extractKeyValue

        public org.apache.pulsar.io.core.KeyValue<java.lang.Long,​java.lang.String> extractKeyValue​(org.apache.pulsar.functions.api.Record<java.lang.String> record)
        指定者:
        extractKeyValue 在类中 HdfsAbstractSink<java.lang.Long,​java.lang.String>
      • convert

        public org.apache.pulsar.io.core.KeyValue<org.apache.hadoop.io.LongWritable,​org.apache.hadoop.io.Text> convert​(org.apache.pulsar.io.core.KeyValue<java.lang.Long,​java.lang.String> kv)
        指定者:
        convert 在类中 HdfsAbstractSequenceFileSink<java.lang.Long,​java.lang.String,​org.apache.hadoop.io.LongWritable,​org.apache.hadoop.io.Text>