Package com.asakusafw.runtime.io

Examples of com.asakusafw.runtime.io.TsvEmitter


        ModelWrapper object = loader.newModel("Simple");
        DataOutputBuffer output = new DataOutputBuffer();
        ModelOutput<Object> modelOut = (ModelOutput<Object>) type.getAnnotation(ModelOutputLocation.class)
            .value()
            .getDeclaredConstructor(RecordEmitter.class)
            .newInstance(new TsvEmitter(new OutputStreamWriter(output, "UTF-8")));

        object.set("sid", 1L);
        object.set("value", new Text("hello"));
        modelOut.write(object.unwrap());
View Full Code Here


        DataOutputBuffer output = new DataOutputBuffer();
        ModelOutput<Object> modelOut = (ModelOutput<Object>) type.getAnnotation(ModelOutputLocation.class)
            .value()
            .getDeclaredConstructor(RecordEmitter.class)
            .newInstance(new TsvEmitter(new OutputStreamWriter(output, "UTF-8")));
        modelOut.write(object.unwrap());
        modelOut.write(object.unwrap());
        modelOut.write(object.unwrap());
        modelOut.close();
View Full Code Here

    @Override
    @Before
    public void setUp() throws Exception {
        super.setUp();
        this.buffer = new StringWriter();
        this.emitter = new TsvEmitter(buffer);
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.runtime.io.TsvEmitter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.