Example usage for org.apache.hadoop.io Text Text

List of usage examples for org.apache.hadoop.io Text Text

Introduction

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

Prototype

public Text(byte[] utf8) 

Source Link

Document

Construct from a byte array.

Usage

From source file:com.asakusafw.windgate.hadoopfs.HadoopFsMirrorTest.java

License:Apache License

/**
 * drain with multiplevalue.// w  w  w.  jav  a 2s. c  o m
 * @throws Exception if failed
 */
@Test
public void drain_multivalue() throws Exception {
    try (HadoopFsMirror resource = new HadoopFsMirror(conf, profile(), new ParameterList())) {
        ProcessScript<Text> process = drain("target", "testing");
        resource.prepare(script(process));
        try (DrainDriver<Text> driver = resource.createDrain(process)) {
            driver.prepare();
            driver.put(new Text("Hello1, world!"));
            driver.put(new Text("Hello2, world!"));
            driver.put(new Text("Hello3, world!"));
        }
    }

    test("testing", "Hello1, world!", "Hello2, world!", "Hello3, world!");
}