Package com.twitter.elephantbird.thrift.test

Examples of com.twitter.elephantbird.thrift.test.TestPerson


    Person person = new Person(new Name("bob", "jenkins"), 42, "foo@bar.com", Lists.newArrayList(ph));
    assertEquals("(bob,jenkins),42,foo@bar.com,{(415-555-5555,HOME)}", toTuple(type, person).toDelimitedString(","));

    // test Enum map
    TestPerson testPerson = new TestPerson(
                                  new TestName("bob", "jenkins"),
                                  ImmutableMap.of(
                                      TestPhoneType.HOME,   "408-555-5555",
                                      TestPhoneType.MOBILE, "650-555-5555",
                                      TestPhoneType.WORK,   "415-555-5555"));
View Full Code Here


    // create input with 100 records with 10% of records with errors.

    RawBlockWriter blk_writer = new RawBlockWriter(createLzoOut(new File(inDir, "1-block.lzo"), conf));

    TestPerson person = records[records.length - 1];
    String expectedStr = personToString(person);
    byte[] properRec = tConverter.toBytes(person);
    byte[] truncatedRec = Arrays.copyOfRange(properRec, 0, properRec.length*3/4);

    final int totalRecords = 100;
View Full Code Here

  private ThriftToPig<TestPerson> thriftToPig = ThriftToPig.newInstance(TestPerson.class);
  private ThriftConverter<TestPerson> tConverter = ThriftConverter.newInstance(TestPerson.class);

  // return a Person thrift object
  private TestPerson makePerson(int index) {
    return new TestPerson(
              new TestName("bob " + index, "jenkins"),
              ImmutableMap.of(TestPhoneType.HOME,
                              "408-555-5555" + "ex" + index));
  }
View Full Code Here

  private ThriftToPig<TestPerson> thriftToPig = ThriftToPig.newInstance(TestPerson.class);
  private ThriftWritable<TestPerson> thriftWritable = ThriftWritable.newInstance(TestPerson.class);

  // return a Person thrift object
  private TestPerson makePerson(int index) {
    return new TestPerson(
              new TestName("bob " + index, "jenkins"),
              ImmutableMap.of(TestPhoneType.HOME,
                              "408-555-5555" + "ex" + index));
  }
View Full Code Here

TOP

Related Classes of com.twitter.elephantbird.thrift.test.TestPerson

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.