Examples of toTuple()


Examples of com.twitter.elephantbird.pig.util.ProtobufToPig.toTuple()

  public static void main(String[] args) throws ExecException {
    int iterations = 100000;
    ProtobufToPig protoConv = new ProtobufToPig();
    for (int i = 0; i < iterations; i++) {
      Person proto = Fixtures.buildPersonProto();
      Tuple t = protoConv.toTuple(proto);
      t.get(0);
      t = new ProtobufTuple(proto);
      t.get(0);
    }
    StopWatch timer = new StopWatch();
View Full Code Here

Examples of com.twitter.elephantbird.pig.util.ProtobufToPig.toTuple()

    }
    StopWatch timer = new StopWatch();
    timer.start();
    for (int i = 0; i < iterations; i++) {
      Person proto = Fixtures.buildPersonProto();
      Tuple t = protoConv.toTuple(proto);
      t.get(0);
    }
    timer.split();
    System.err.println(timer.getSplitTime());
    timer.reset();
View Full Code Here

Examples of org.apache.pig.data.IndexedTuple.toTuple()

                t.setField(i, bags[i - 1]);
            }

            while (values.hasNext()) {
                IndexedTuple it = values.next();
                t.getBagField(it.index + 1).add(it.toTuple());
            }
           
            for (int i = 0; i < inputCount; i++) {
                if (isInner[i] && t.getBagField(1 + i).size() == 0)
                    return;
View Full Code Here

Examples of org.apache.pig.data.IndexedTuple.toTuple()

                t.setField(i, bags[i - 1]);
            }

            while (values.hasNext()) {
                IndexedTuple it = values.next();
                t.getBagField(it.index + 1).add(it.toTuple());
            }
            for (int i = 0; i < inputCount; i++) {  // XXX: shouldn't we only do this if INNER flag is set?
                if (t.getBagField(1 + i).size() == 0)
                    return;
            }
View Full Code Here

Examples of org.apache.pig.data.IndexedTuple.toTuple()

                t.setField(i, bags[i - 1]);
            }

            while (values.hasNext()) {
                IndexedTuple it = values.next();
                t.getBagField(it.index + 1).add(it.toTuple());
            }
            for (int i = 0; i < inputCount; i++) {  // XXX: shouldn't we only do this if INNER flag is set?
                if (t.getBagField(1 + i).size() == 0)
                    return;
            }
View Full Code Here

Examples of org.apache.tajo.storage.RowStoreUtil.RowStoreDecoder.toTuple()

    RowStoreDecoder decoder = RowStoreUtil.createDecoder(keySchema);
    Tuple start;
    Tuple end;
    try {
      start = decoder.toTuple(startBytes);
    } catch (Throwable t) {
      throw new IllegalArgumentException("StartKey: " + startKey
          + ", decoded byte size: " + startBytes.length, t);
    }
View Full Code Here

Examples of org.apache.tajo.storage.RowStoreUtil.RowStoreDecoder.toTuple()

      throw new IllegalArgumentException("StartKey: " + startKey
          + ", decoded byte size: " + startBytes.length, t);
    }

    try {
      end = decoder.toTuple(endBytes);
    } catch (Throwable t) {
      throw new IllegalArgumentException("EndKey: " + endKey
          + ", decoded byte size: " + endBytes.length, t);
    }
View Full Code Here

Examples of org.apache.tajo.storage.RowStoreUtil.RowStoreDecoder.toTuple()

    RowStoreDecoder decoder = RowStoreUtil.createDecoder(keySchema);
    Tuple start;
    Tuple end;
    try {
      start = decoder.toTuple(startBytes);
    } catch (Throwable t) {
      throw new IllegalArgumentException("StartKey: " + startKey
          + ", decoded byte size: " + startBytes.length, t);
    }
View Full Code Here

Examples of org.apache.tajo.storage.RowStoreUtil.RowStoreDecoder.toTuple()

      throw new IllegalArgumentException("StartKey: " + startKey
          + ", decoded byte size: " + startBytes.length, t);
    }

    try {
      end = decoder.toTuple(endBytes);
    } catch (Throwable t) {
      throw new IllegalArgumentException("EndKey: " + endKey
          + ", decoded byte size: " + endBytes.length, t);
    }
View Full Code Here

Examples of org.apache.tajo.storage.RowStoreUtil.RowStoreDecoder.toTuple()

    });

    RowStoreEncoder encoder = RowStoreUtil.createEncoder(schema);
    RowStoreDecoder decoder = RowStoreUtil.createDecoder(schema);
    byte [] bytes = encoder.toBytes(tuple);
    Tuple tuple2 = decoder.toTuple(bytes);
   
    assertEquals(tuple, tuple2);
  }

  @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.