Examples of WritableBinaryObjectInspector


Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBinaryObjectInspector

   */
  public void testWritableBinaryObjectInspector() throws Throwable {
    BytesWritable bW = getInputBytesWritable();

    //test WritableBinaryObjectInspector
    WritableBinaryObjectInspector writableBinInsp =
        PrimitiveObjectInspectorFactory.writableBinaryObjectInspector;

    //convert BytesWritable to byte[]
    byte[] outBARef = writableBinInsp.getPrimitiveJavaObject(bW);

    assertTrue("compare input and output BAs",
        Arrays.equals(inpBArray, outBARef));
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBinaryObjectInspector

   */
  public void testWritableBinaryObjectInspector() throws Throwable {
    BytesWritable bW = getInputBytesWritable();

    //test WritableBinaryObjectInspector
    WritableBinaryObjectInspector writableBinInsp =
        PrimitiveObjectInspectorFactory.writableBinaryObjectInspector;

    //convert BytesWritable to byte[]
    byte[] outBARef = writableBinInsp.getPrimitiveJavaObject(bW);

    assertTrue("compare input and output BAs",
        Arrays.equals(inpBArray, outBARef));
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBinaryObjectInspector

    if (oi instanceof WritableStringObjectInspector) {
      WritableStringObjectInspector woi = (WritableStringObjectInspector) oi;
      return JavaDataModel.get().lengthForStringOfLength(
          woi.getPrimitiveWritableObject(value).getLength());
    } else if (oi instanceof WritableBinaryObjectInspector) {
      WritableBinaryObjectInspector woi = (WritableBinaryObjectInspector) oi;
      return JavaDataModel.get().lengthForByteArrayOfSize(
          woi.getPrimitiveWritableObject(value).getLength());
    } else if (oi instanceof WritableBooleanObjectInspector) {
      return JavaDataModel.get().primitive1();
    } else if (oi instanceof WritableByteObjectInspector) {
      return JavaDataModel.get().primitive1();
    } else if (oi instanceof WritableDateObjectInspector) {
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBinaryObjectInspector

    if (oi instanceof WritableStringObjectInspector) {
      WritableStringObjectInspector woi = (WritableStringObjectInspector) oi;
      return JavaDataModel.get().lengthForStringOfLength(
          woi.getPrimitiveWritableObject(value).getLength());
    } else if (oi instanceof WritableBinaryObjectInspector) {
      WritableBinaryObjectInspector woi = (WritableBinaryObjectInspector) oi;
      return JavaDataModel.get().lengthForByteArrayOfSize(
          woi.getPrimitiveWritableObject(value).getLength());
    } else if (oi instanceof WritableBooleanObjectInspector) {
      return JavaDataModel.get().primitive1();
    } else if (oi instanceof WritableByteObjectInspector) {
      return JavaDataModel.get().primitive1();
    } else if (oi instanceof WritableDateObjectInspector) {
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBinaryObjectInspector

   */
  public void testWritableBinaryObjectInspector() throws Throwable {
    BytesWritable bW = getInputBytesWritable();

    //test WritableBinaryObjectInspector
    WritableBinaryObjectInspector writableBinInsp =
        PrimitiveObjectInspectorFactory.writableBinaryObjectInspector;

    //convert BytesWritable to byte[]
    byte[] outBARef = writableBinInsp.getPrimitiveJavaObject(bW);

    assertTrue("compare input and output BAs",
        Arrays.equals(inpBArray, outBARef));
  }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBinaryObjectInspector

    if (oi instanceof WritableStringObjectInspector) {
      WritableStringObjectInspector woi = (WritableStringObjectInspector) oi;
      return JavaDataModel.get().lengthForStringOfLength(
          woi.getPrimitiveWritableObject(value).getLength());
    } else if (oi instanceof WritableBinaryObjectInspector) {
      WritableBinaryObjectInspector woi = (WritableBinaryObjectInspector) oi;
      return JavaDataModel.get().lengthForByteArrayOfSize(
          woi.getPrimitiveWritableObject(value).getLength());
    } else if (oi instanceof WritableBooleanObjectInspector) {
      return JavaDataModel.get().primitive1();
    } else if (oi instanceof WritableByteObjectInspector) {
      return JavaDataModel.get().primitive1();
    } else if (oi instanceof WritableDateObjectInspector) {
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBinaryObjectInspector

   */
  public void testWritableBinaryObjectInspector() throws Throwable {
    BytesWritable bW = getInputBytesWritable();

    //test WritableBinaryObjectInspector
    WritableBinaryObjectInspector writableBinInsp =
        PrimitiveObjectInspectorFactory.writableBinaryObjectInspector;

    //convert BytesWritable to byte[]
    byte[] outBARef = writableBinInsp.getPrimitiveJavaObject(bW);

    assertTrue("compare input and output BAs",
        Arrays.equals(inpBArray, outBARef));
  }
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.