Class SequenceFileWriterFactory<K extends org.apache.hadoop.io.Writable,V extends org.apache.hadoop.io.Writable>
- java.lang.Object
-
- org.apache.flink.formats.sequencefile.SequenceFileWriterFactory<K,V>
-
- 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 SequenceFileBulkWriter.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringNO_COMPRESSIONA constant specifying that no compression is requested.
-
Constructor Summary
Constructors Constructor Description 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.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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SequenceFileWriter<K,V>create(org.apache.flink.core.fs.FSDataOutputStream out)
-
-
-
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:
createin interfaceorg.apache.flink.api.common.serialization.BulkWriter.Factory<K extends org.apache.hadoop.io.Writable>- Throws:
IOException
-
-