Package org.apache.crunch.test.orc.pojos

Examples of org.apache.crunch.test.orc.pojos.AddressBook


  @Test
  public void testReflects() {
    PType<AddressBook> ptype = Orcs.reflects(AddressBook.class);
   
    AddressBook ab = new AddressBook();
    ab.setMyName("John Smith");
    ab.setMyNumbers(Arrays.asList("919-333-4452", "650-777-4329"));
    Map<String, Person> contacts = new HashMap<String, Person>();
    contacts.put("Alice", new Person("Alice", 23, Arrays.asList("666-677-9999")));
    contacts.put("Bob", new Person("Bob", 26, Arrays.asList("999-888-1132", "000-222-9934")));
    contacts.put("David", null);
    ab.setContacts(contacts);
    Timestamp now = new Timestamp(System.currentTimeMillis());
    ab.setUpdateTime(now);
    byte[] signature = {0, 0, 64, 68, 39, 0};
    ab.setSignature(signature);
   
    Map<Text, OrcStruct> map = new HashMap<Text, OrcStruct>();
    map.put(new Text("Alice"), OrcUtils.createOrcStruct(Person.TYPE_INFO, new Text("Alice"), new IntWritable(23),
        Arrays.asList(new Text("666-677-9999"))));
    map.put(new Text("Bob"), OrcUtils.createOrcStruct(Person.TYPE_INFO, new Text("Bob"), new IntWritable(26),
View Full Code Here

TOP

Related Classes of org.apache.crunch.test.orc.pojos.AddressBook

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.