Class SequenceFileWriterFactory<K extends org.apache.hadoop.io.Writable,​V extends org.apache.hadoop.io.Writable>

  • Type Parameters:
    K - The type of key to write. It should be writable.
    V - The type of value to write. It should be writable.
    All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.serialization.BulkWriter.Factory<org.apache.flink.api.java.tuple.Tuple2<K,​V>>

    @PublicEvolving
    public class SequenceFileWriterFactory<K extends org.apache.hadoop.io.Writable,​V extends org.apache.hadoop.io.Writable>
    extends Object
    implements org.apache.flink.api.common.serialization.BulkWriter.Factory<org.apache.flink.api.java.tuple.Tuple2<K,​V>>
    A factory that creates a SequenceFile BulkWriter.
    See Also:
    Serialized Form
    • Field Detail

      • NO_COMPRESSION

        public static final String NO_COMPRESSION
        A constant specifying that no compression is requested.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SequenceFileWriterFactory

        public SequenceFileWriterFactory​(org.apache.hadoop.conf.Configuration hadoopConf,
                                         Class<K> keyClass,
                                         Class<V> valueClass)
        Creates a new SequenceFileWriterFactory using the given builder to assemble the SequenceFileWriter.
        Parameters:
        hadoopConf - The Hadoop configuration for Sequence File Writer.
        keyClass - The class of key to write.
        valueClass - The class of value to write.
      • SequenceFileWriterFactory

        public SequenceFileWriterFactory​(org.apache.hadoop.conf.Configuration hadoopConf,
                                         Class<K> keyClass,
                                         Class<V> valueClass,
                                         String compressionCodecName)
        Creates a new SequenceFileWriterFactory using the given builder to assemble the SequenceFileWriter.
        Parameters:
        hadoopConf - The Hadoop configuration for Sequence File Writer.
        keyClass - The class of key to write.
        valueClass - The class of value to write.
        compressionCodecName - The name of compression codec.
      • SequenceFileWriterFactory

        public SequenceFileWriterFactory​(org.apache.hadoop.conf.Configuration hadoopConf,
                                         Class<K> keyClass,
                                         Class<V> valueClass,
                                         String compressionCodecName,
                                         org.apache.hadoop.io.SequenceFile.CompressionType compressionType)
        Creates a new SequenceFileWriterFactory using the given builder to assemble the SequenceFileWriter.
        Parameters:
        hadoopConf - The Hadoop configuration for Sequence File Writer.
        keyClass - The class of key to write.
        valueClass - The class of value to write.
        compressionCodecName - The name of compression codec.
        compressionType - The type of compression level.
    • Method Detail

      • create

        public SequenceFileWriter<K,​V> create​(org.apache.flink.core.fs.FSDataOutputStream out)
                                             throws IOException
        Specified by:
        create in interface org.apache.flink.api.common.serialization.BulkWriter.Factory<K extends org.apache.hadoop.io.Writable>
        Throws:
        IOException