Package org.apache.crunch

Examples of org.apache.crunch.Tuple4


  }

  @Test
  @SuppressWarnings("rawtypes")
  public void testQuads() throws Exception {
    Tuple4 j = Tuple4.of("a", "b", "c", "d");
    Text[] t = new Text[] { new Text("a"), new Text("b"), new Text("c"), new Text("d"), };
    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 testQuads() throws Exception {
    Tuple4 j = Tuple4.of("a", "b", "c", "d");
    Text[] t = new Text[] { new Text("a"), new Text("b"), new Text("c"), new Text("d"), };
    TupleWritable w = new TupleWritable(t);
    WritableType<?, ?> wt = Writables.quads(Writables.strings(), Writables.strings(), Writables.strings(),
        Writables.strings());
    testInputOutputFn(wt, j, w);
View Full Code Here

  @Test
  @SuppressWarnings("rawtypes")
  public void testQuads() throws Exception {
    AvroType at = Avros.quads(Avros.strings(), Avros.strings(), Avros.strings(), Avros.strings());
    Tuple4 j = Tuple4.of("a", "b", "c", "d");
    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"));
    w.put(3, new Utf8("d"));
View Full Code Here

  @Test
  @SuppressWarnings("rawtypes")
  public void testQuads() throws Exception {
    AvroType at = Avros.quads(Avros.strings(), Avros.strings(), Avros.strings(), Avros.strings());
    Tuple4 j = Tuple4.of("a", "b", "c", "d");
    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"));
    w.put(3, new Utf8("d"));
View Full Code Here

  }

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

  @Test
  @SuppressWarnings("rawtypes")
  public void testQuads() throws Exception {
    AvroType at = Avros.quads(Avros.strings(), Avros.strings(), Avros.strings(), Avros.strings());
    Tuple4 j = Tuple4.of("a", "b", "c", "d");
    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"));
    w.put(3, new Utf8("d"));
View Full Code Here

  }

  @Test
  @SuppressWarnings("rawtypes")
  public void testQuads() throws Exception {
    Tuple4 j = Tuple4.of("a", "b", "c", "d");
    TupleWritable w = new TupleWritable(new Text[] { new Text("a"), new Text("b"), new Text("c"), new Text("d"), });
    w.setWritten(0);
    w.setWritten(1);
    w.setWritten(2);
    w.setWritten(3);
View Full Code Here

  @Test
  @SuppressWarnings("rawtypes")
  public void testQuads() throws Exception {
    AvroType at = Avros.quads(Avros.strings(), Avros.strings(), Avros.strings(), Avros.strings());
    Tuple4 j = Tuple4.of("a", "b", "c", "d");
    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"));
    w.put(3, new Utf8("d"));
View Full Code Here

  @Test
  @SuppressWarnings("rawtypes")
  public void testQuads() throws Exception {
    AvroType at = Avros.quads(Avros.strings(), Avros.strings(), Avros.strings(), Avros.strings());
    Tuple4 j = Tuple4.of("a", "b", "c", "d");
    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"));
    w.put(3, new Utf8("d"));
View Full Code Here

TOP

Related Classes of org.apache.crunch.Tuple4

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.