Examples of ShortWritable


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

    public boolean merge(ShortWritable o) {
      return iterate(o);
    }

    public ShortWritable terminate() {
      return mEmpty ? null : new ShortWritable(mMax);
    }
View Full Code Here

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

      }
      return true;
    }

    public ShortWritable terminatePartial() {
      return mEmpty ? null : new ShortWritable(mMin);
    }
View Full Code Here

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

    public boolean merge(ShortWritable o) {
      return iterate(o);
    }

    public ShortWritable terminate() {
      return mEmpty ? null : new ShortWritable(mMin);
    }
View Full Code Here

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

    case BOOL:
      return new BooleanWritable();
    case INT:
      return new IntWritable();
    case SHORT:
      return new ShortWritable();
    case LONG:
      return new LongWritable();
    case FLOAT:
      return new FloatWritable();
    case DOUBLE:
View Full Code Here

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

    return ((ShortWritable)o).get();
  }

  @Override
  public Object copyObject(Object o) {
    return o == null ? null : new ShortWritable(((ShortWritable)o).get());
  }
View Full Code Here

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

    return o == null ? null : Short.valueOf(((ShortWritable)o).get());
  }
 
  @Override
  public Object create(short value) {
    return new ShortWritable(value);
  }
View Full Code Here

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

    }
    writer.append(bytes);
    writer.close();

    Object[] expectedRecord_1 = { new ByteWritable((byte) 123),
        new ShortWritable((short) 456), new IntWritable(789),
        new LongWritable(1000), new DoubleWritable(5.3),
        new Text("hive and hadoop"), null, null };

    Object[] expectedRecord_2 = { new ByteWritable((byte) 100),
        new ShortWritable((short) 200), new IntWritable(123),
        new LongWritable(1000), new DoubleWritable(5.3),
        new Text("hive and hadoop"), null, null };

    RCFile.Reader reader = new RCFile.Reader(fs, file, conf);
View Full Code Here

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

            ByteWritable r = reuse == null ? new ByteWritable() : (ByteWritable)reuse;
            r = (ByteWritable)in.readByte(r);
            return r;
          }
          case SHORT: {
            ShortWritable r = reuse == null ? new ShortWritable() : (ShortWritable)reuse;
            r = (ShortWritable)in.readShort(r);
            return r;
          }
          case INT: {
            IntWritable r = reuse == null ? new IntWritable() : (IntWritable)reuse;
View Full Code Here

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

            tbOut.write(r);
            return;
          }
          case SHORT: {
            ShortObjectInspector spoi = (ShortObjectInspector)poi;
            ShortWritable r = reuse == null ? new ShortWritable() : (ShortWritable)reuse;
            r.set(spoi.get(o));
            tbOut.write(r);
            return;
          }
          case INT: {
            IntObjectInspector ioi = (IntObjectInspector)poi;
            IntWritable r = reuse == null ? new IntWritable() : (IntWritable)reuse;
            r.set(ioi.get(o));
            tbOut.write(r);
            return;
          }
          case LONG: {
            LongObjectInspector loi = (LongObjectInspector)poi;
            LongWritable r = reuse == null ? new LongWritable() : (LongWritable)reuse;
            r.set(loi.get(o));
            tbOut.write(r);
            return;
          }
          case FLOAT: {
            FloatObjectInspector foi = (FloatObjectInspector)poi;
            FloatWritable r = reuse == null ? new FloatWritable() : (FloatWritable)reuse;
            r.set(foi.get(o));
            tbOut.write(r);
            return;
          }
          case DOUBLE: {
            DoubleObjectInspector doi = (DoubleObjectInspector)poi;
            DoubleWritable r = reuse == null ? new DoubleWritable() : (DoubleWritable)reuse;
            r.set(doi.get(o));
            tbOut.write(r);
            return;
          }
          case STRING: {
            StringObjectInspector soi = (StringObjectInspector)poi;
View Full Code Here

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

    return readInt(null);
  }

  public ShortWritable readShort(ShortWritable sw) throws IOException {
    if (sw == null) {
      sw = new ShortWritable();
    }
    sw.set(in.readShort());
    return sw;
  }
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.