Package org.apache.hadoop.io

Examples of org.apache.hadoop.io.FloatWritable$Comparator


    return o == null ? null : Float.valueOf(((FloatWritable)o).get());
  }

  @Override
  public Object create(float value) {
    return new FloatWritable(value);
  }
View Full Code Here


    super(PrimitiveObjectInspectorUtils.floatTypeEntry);
  }
 
  @Override
  public Object getPrimitiveWritableObject(Object o) {
    return o == null ? null : new FloatWritable(((Float)o).floatValue());
  }
View Full Code Here

      }
      return true;
    }

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

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

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

      }
      return true;
    }

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

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

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

    case SHORT:
      return new ShortWritable();
    case LONG:
      return new LongWritable();
    case FLOAT:
      return new FloatWritable();
    case DOUBLE:
      return new DoubleWritable();
    case STRING:
      return new Text();
     default:
View Full Code Here

    return readVLong(null);
  }

  public FloatWritable readFloat(FloatWritable fw) throws IOException {
    if (fw == null) {
      fw = new FloatWritable();
    }
    fw.set(in.readFloat());
    return fw;
  }
View Full Code Here

            LongWritable r = reuse == null ? new LongWritable() : (LongWritable)reuse;
            r = (LongWritable)in.readLong(r);
            return r;
          }
          case FLOAT: {
            FloatWritable r = reuse == null ? new FloatWritable() : (FloatWritable)reuse;
            r = (FloatWritable)in.readFloat(r);
            return r;
          }
          case DOUBLE: {
            DoubleWritable r = reuse == null ? new DoubleWritable() : (DoubleWritable)reuse;
View Full Code Here

            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

TOP

Related Classes of org.apache.hadoop.io.FloatWritable$Comparator

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.