Package org.apache.hadoop.vertica

Examples of org.apache.hadoop.vertica.VerticaInputSplit


      segment_params.add("foobar");
      start = 5;
      end = 10;
    }

    VerticaInputSplit input = new VerticaInputSplit(input_query,
        segment_params, start, end);
    input.configure(getVerticaJob().getConfiguration());

    return input;
  }
View Full Code Here


  public void testVerticaSplit() throws Exception {
    if(!AllTests.isSetup()) {
      return;
    }

    VerticaInputSplit input = getVerticaSplit(true);
    VerticaInputSplit rem_input = new VerticaInputSplit();

    DataOutputBuffer out = new DataOutputBuffer();
    DataInputBuffer in = new DataInputBuffer();

    input.write(out);

    in.reset(out.getData(), out.getLength());

    rem_input.readFields(in);
    assertEquals("Serialized segment params do not match", rem_input.getSegmentParams(), input.getSegmentParams());
    assertEquals("Serialized start does not match", rem_input.getStart(), input.getStart());
    assertEquals("Serialized length does not match", rem_input.getLength(), input.getLength());
  }
View Full Code Here

  public void testVerticaReader() throws Exception {
    if(!AllTests.isSetup()) {
      return;
    }

    VerticaInputSplit input = getVerticaSplit(false);
    VerticaRecordReader reader = new VerticaRecordReader(input, input
        .getConfiguration());
    TaskAttemptContext context = new TaskAttemptContextImpl(input
        .getConfiguration(), new TaskAttemptID());
    reader.initialize(input, context);

    boolean hasValue = reader.nextKeyValue();
    assertEquals("There should be a record in the database", hasValue, true);
View Full Code Here

TOP

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

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.