Example usage for org.apache.mahout.utils.io ChunkedWriter write

List of usage examples for org.apache.mahout.utils.io ChunkedWriter write

Introduction

In this page you can find the example usage for org.apache.mahout.utils.io ChunkedWriter write.

Prototype

public void write(String key, String value) throws IOException 

Source Link

Document

Writes a new key-value pair, creating a new sequence file if necessary.

Usage

From source file:edu.indiana.d2i.htrc.io.SequentialDataCopyJob.java

License:Apache License

private void text2Seq(Iterable<Entry<String, String>> content, ChunkedWriter chunkWriter) throws IOException {
    if (content != null) {
        Iterator<Entry<String, String>> iterator = content.iterator();
        while (iterator.hasNext()) {
            Entry<String, String> entry = iterator.next();
            chunkWriter.write(entry.getKey(), entry.getValue());
        }//from  w w w. j  a  v  a  2s . co m
    }
}