Example usage for org.apache.hadoop.io SequenceFile createWriter

List of usage examples for org.apache.hadoop.io SequenceFile createWriter

Introduction

In this page you can find the example usage for org.apache.hadoop.io SequenceFile createWriter.

Prototype

public static Writer createWriter(Configuration conf, Writer.Option... opts) throws IOException 

Source Link

Document

Create a new Writer with the given options.

Usage

From source file:org.apache.pulsar.io.hdfs.sink.seq.HdfsAbstractSequenceFileSink.java

License:Apache License

protected Writer getWriter() throws IOException {
    counter = new AtomicLong(0);
    List<Option> options = getOptions();
    return SequenceFile.createWriter(getConfiguration(), options.toArray(new Option[options.size()]));
}

From source file:org.apache.pulsar.io.hdfs.sink.seq.HdfsSequentialTextSink.java

License:Apache License

@Override
public Writer getWriter() throws IOException {
    counter = new AtomicLong(0);

    return SequenceFile.createWriter(getConfiguration(), getOptions().toArray(new Option[getOptions().size()]));
}