Package com.twitter.elephantbird.pig.util

Examples of com.twitter.elephantbird.pig.util.ProtobufToPig


    }
    return builder.build();
  }

  private static String personToString(Person person) {
    return new ProtobufToPig().toTuple(person).toString();
  }
View Full Code Here


              .setType(PhoneType.MOBILE))
      .build();
  }

  private static String personToString(Person person) {
    return new ProtobufToPig().toTuple(person).toString();
  }
View Full Code Here

   * @param args
   * @throws ExecException
   */
  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();
    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

TOP

Related Classes of com.twitter.elephantbird.pig.util.ProtobufToPig

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.