Package org.apache.crunch

Examples of org.apache.crunch.Tuple3


  }

  @Test
  @SuppressWarnings("rawtypes")
  public void testTriples() throws Exception {
    Tuple3 j = Tuple3.of("a", "b", "c");
    Text[] t = new Text[] { new Text("a"), new Text("b"), new Text("c"), };
    BytesWritable[] b = new BytesWritable[t.length];
    for (int i = 0; i < t.length; i++) {
      b[i] = new BytesWritable(WritableUtils.toByteArray(t[i]));
    }
View Full Code Here


  }

  @Test
  @SuppressWarnings("rawtypes")
  public void testTriples() throws Exception {
    Tuple3 j = Tuple3.of("a", "b", "c");
    Text[] t = new Text[] { new Text("a"), new Text("b"), new Text("c"), };
    TupleWritable w = new TupleWritable(t);
    WritableType<?, ?> wt = Writables.triples(Writables.strings(), Writables.strings(), Writables.strings());
    testInputOutputFn(wt, j, w);
  }
View Full Code Here

  @Test
  @SuppressWarnings("rawtypes")
  public void testTriples() throws Exception {
    AvroType at = Avros.triples(Avros.strings(), Avros.strings(), Avros.strings());
    Tuple3 j = Tuple3.of("a", "b", "c");
    GenericData.Record w = new GenericData.Record(at.getSchema());
    w.put(0, new Utf8("a"));
    w.put(1, new Utf8("b"));
    w.put(2, new Utf8("c"));
    testInputOutputFn(at, j, w);
View Full Code Here

  @Test
  @SuppressWarnings("rawtypes")
  public void testTriples() throws Exception {
    AvroType at = Avros.triples(Avros.strings(), Avros.strings(), Avros.strings());
    Tuple3 j = Tuple3.of("a", "b", "c");
    GenericData.Record w = new GenericData.Record(at.getSchema());
    w.put(0, new Utf8("a"));
    w.put(1, new Utf8("b"));
    w.put(2, new Utf8("c"));
    testInputOutputFn(at, j, w);
View Full Code Here

  }

  @Test
  @SuppressWarnings("rawtypes")
  public void testTriples() throws Exception {
    Tuple3 j = Tuple3.of("a", "b", "c");
    Text[] t = new Text[] { new Text("a"), new Text("b"), new Text("c"), };
    TupleWritable w = new TupleWritable(t);
    WritableType<?, ?> wt = Writables.triples(Writables.strings(), Writables.strings(), Writables.strings());
    testInputOutputFn(wt, j, w);
  }
View Full Code Here

  @Test
  @SuppressWarnings("rawtypes")
  public void testTriples() throws Exception {
    AvroType at = Avros.triples(Avros.strings(), Avros.strings(), Avros.strings());
    Tuple3 j = Tuple3.of("a", "b", "c");
    GenericData.Record w = new GenericData.Record(at.getSchema());
    w.put(0, new Utf8("a"));
    w.put(1, new Utf8("b"));
    w.put(2, new Utf8("c"));
    testInputOutputFn(at, j, w);
View Full Code Here

  }

  @Test
  @SuppressWarnings("rawtypes")
  public void testTriples() throws Exception {
    Tuple3 j = Tuple3.of("a", "b", "c");
    TupleWritable w = new TupleWritable(new Text[] { new Text("a"), new Text("b"), new Text("c"), });
    w.setWritten(0);
    w.setWritten(1);
    w.setWritten(2);
    WritableType<?, ?> wt = Writables.triples(Writables.strings(), Writables.strings(), Writables.strings());
View Full Code Here

  @Test
  @SuppressWarnings("rawtypes")
  public void testTriples() throws Exception {
    AvroType at = Avros.triples(Avros.strings(), Avros.strings(), Avros.strings());
    Tuple3 j = Tuple3.of("a", "b", "c");
    GenericData.Record w = new GenericData.Record(at.getSchema());
    w.put(0, new Utf8("a"));
    w.put(1, new Utf8("b"));
    w.put(2, new Utf8("c"));
    testInputOutputFn(at, j, w);
View Full Code Here

  @Test
  @SuppressWarnings("rawtypes")
  public void testTriples() throws Exception {
    AvroType at = Avros.triples(Avros.strings(), Avros.strings(), Avros.strings());
    Tuple3 j = Tuple3.of("a", "b", "c");
    GenericData.Record w = new GenericData.Record(at.getSchema());
    w.put(0, new Utf8("a"));
    w.put(1, new Utf8("b"));
    w.put(2, new Utf8("c"));
    testInputOutputFn(at, j, w);
View Full Code Here

TOP

Related Classes of org.apache.crunch.Tuple3

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.