Package org.apache.crunch.types.orc.TupleObjectInspector

Examples of org.apache.crunch.types.orc.TupleObjectInspector.ByteBufferObjectInspector.create()


    ByteBuffer buf = ByteBuffer.wrap(bytes);
    ByteBufferObjectInspector bboi = new ByteBufferObjectInspector();
   
    assertArrayEquals(bytes, bboi.getPrimitiveJavaObject(buf));
    assertEquals(bw, bboi.getPrimitiveWritableObject(buf));
    assertEquals(buf, bboi.create(bytes));
    assertEquals(buf, bboi.create(bw));
   
    ByteBuffer newBuf = bboi.copyObject(buf);
    assertTrue(buf != newBuf);
    assertEquals(buf, newBuf);
View Full Code Here


    ByteBufferObjectInspector bboi = new ByteBufferObjectInspector();
   
    assertArrayEquals(bytes, bboi.getPrimitiveJavaObject(buf));
    assertEquals(bw, bboi.getPrimitiveWritableObject(buf));
    assertEquals(buf, bboi.create(bytes));
    assertEquals(buf, bboi.create(bw));
   
    ByteBuffer newBuf = bboi.copyObject(buf);
    assertTrue(buf != newBuf);
    assertEquals(buf, newBuf);
  }
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.