Package org.apache.hadoop.vertica

Examples of org.apache.hadoop.vertica.VerticaRecordWriter


        "c char(1)", "d date", "f float", "t timestamp", "v varchar",
        "z varbinary");
    output.checkOutputSpecs(job, true);
    TaskAttemptContext context = new TaskAttemptContextImpl(job.getConfiguration(),
        new TaskAttemptID());
    VerticaRecordWriter writer = (VerticaRecordWriter) output
        .getRecordWriter(context);

    Text table = new Text();
    table.set("mrtarget");

    VerticaRecord record = VerticaOutputFormat.getValue(job.getConfiguration());
    record.set(0, 125, true);
    record.set(1, true, true);
    record.set(2, 'c', true);
    record.set(3, Calendar.getInstance().getTime(), true);
    record.set(4, 234.526, true);
    record.set(5, Calendar.getInstance().getTime(), true);
    record.set(6, "foobar string", true);
    record.set(7, new byte[10], true);

    writer.write(table, record);
    writer.close(null);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.vertica.VerticaRecordWriter

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.