Package org.apache.hadoop.hive.serde2.io

Examples of org.apache.hadoop.hive.serde2.io.DateWritable


  protected JavaDateObjectInspector() {
    super(PrimitiveObjectInspectorUtils.dateTypeEntry);
  }

  public DateWritable getPrimitiveWritableObject(Object o) {
    return o == null ? null : new DateWritable((Date) o);
  }
View Full Code Here


        byteStream.write(bw.getBytes(),0,length);
        return warnedOnceNullMapKey;
      }

      case DATE: {
        DateWritable d = ((DateObjectInspector) poi).getPrimitiveWritableObject(obj);
        d.writeToByteStream(byteStream);
        return warnedOnceNullMapKey;
      }
      case TIMESTAMP: {
        TimestampObjectInspector toi = (TimestampObjectInspector) poi;
        TimestampWritable t = toi.getPrimitiveWritableObject(obj);
View Full Code Here

        }
        return bw;
      }

      case DATE: {
        DateWritable d = reuse == null ? new DateWritable()
            : (DateWritable) reuse;
        d.set(deserializeInt(buffer, invert));
        return d;
      }

      case TIMESTAMP:
        TimestampWritable t = (reuse == null ? new TimestampWritable() :
View Full Code Here

    LazyBinaryPrimitive<WritableDateObjectInspector, DateWritable> {
  static final Log LOG = LogFactory.getLog(LazyBinaryDate.class);

  LazyBinaryDate(WritableDateObjectInspector oi) {
    super(oi);
    data = new DateWritable();
  }
View Full Code Here

    data = new DateWritable();
  }

  LazyBinaryDate(LazyBinaryDate copy) {
    super(copy);
    data = new DateWritable(copy.data);
  }
View Full Code Here

        byteStream.write(bw.getBytes(),0,length);
        return warnedOnceNullMapKey;
      }

      case DATE: {
        DateWritable d = ((DateObjectInspector) poi).getPrimitiveWritableObject(obj);
        d.writeToByteStream(byteStream);
        return warnedOnceNullMapKey;
      }
      case TIMESTAMP: {
        TimestampObjectInspector toi = (TimestampObjectInspector) poi;
        TimestampWritable t = toi.getPrimitiveWritableObject(obj);
View Full Code Here

  }

<#elseif entry.drillType == "Date">
  @Override
  public DateWritable getPrimitiveWritableObject(Object o) {
    return new DateWritable(getPrimitiveJavaObject(o));
  }
View Full Code Here

    return latestRead;
  }


  DoubleWritable createWritable(Object previous, double v) throws IOException {
    DoubleWritable result = null;
    if (previous == null) {
      result = new DoubleWritable();
    } else {
      result = (DoubleWritable) previous;
    }
    result.set(v);
    return result;
  }
View Full Code Here

  /**
   * Give the next double as a Writable object.
   */
  @Override
  public Object next(Object previous) throws IOException {
    DoubleWritable result = null;
    if (valuePresent) {
      result = createWritable(previous, readDouble());
    }
    return result;
  }
View Full Code Here

  }

  public OrcLazyDouble(OrcLazyDouble copy) {
    super(copy);
    if (copy.previous != null) {
      previous = new DoubleWritable(((DoubleWritable)copy.previous).get());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.serde2.io.DateWritable

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.