Examples of readFields()


Examples of org.apache.hadoop.io.DataTransferHeaderOptions.readFields()

          // De - Serialize
          DataInputStream in = new DataInputStream(
              new ByteArrayInputStream(buf));
          DataTransferHeaderOptions expectedOptions = new DataTransferHeaderOptions();
          expectedOptions
          .readFields(in);

          assertEquals(advise, expectedOptions.getFadvise());
          assertEquals(c, expectedOptions.getIoprioClass());
          assertEquals(data, expectedOptions.getIoprioData());
View Full Code Here

Examples of org.apache.hadoop.io.DoubleWritable.readFields()

            int i, all;
            for (i = 0; ; i++) {
                all = 0;
                try {
                    DoubleWritable max = new DoubleWritable();
                    max.readFields(input);
                    all++;
                    DoubleWritable min = new DoubleWritable();
                    min.readFields(input);
                    all++;
                    LongWritable sum = new LongWritable();
View Full Code Here

Examples of org.apache.hadoop.io.FastWritableRegister.FastWritable.readFields()

   
    // handle fast writable objects first
    FastWritable fwInstance = FastWritableRegister.tryGetInstance(className,
        conf);
    if (fwInstance != null) {
      fwInstance.readFields(in);
      setObjectWritable(objectWritable, fwInstance.getClass(), fwInstance);
      return fwInstance;
    }
   
    Class<?> declaredClass = getClassWithCaching(className, conf);
View Full Code Here

Examples of org.apache.hadoop.io.FloatWritable.readFields()

    int size = in.readInt();
    for (int i = 0; i < size; i++) {
      Phrase p = new Phrase();
      FloatWritable c = new FloatWritable();
      p.readFields(in);
      c.readFields(in);
      this.put(p, c);
    }
  }

  public void write(DataOutput out) throws IOException {
View Full Code Here

Examples of org.apache.hadoop.io.IntWritable.readFields()

  }
 
  /** read the int value */
  static int readInt(DataInput in) throws IOException {
    IntWritable uInt = TL_DATA.get().U_INT;
    uInt.readFields(in);
    return uInt.get();
  }
 
  /** write the int value */
  static void writeInt(int value, DataOutputStream out) throws IOException {
View Full Code Here

Examples of org.apache.hadoop.io.LongWritable.readFields()

 
  /** read the long value */
  static long readLong(DataInputStream in) throws IOException {
    LongWritable ustr = TL_DATA.get().U_LONG;
    ustr.readFields(in);
    return ustr.get();
  }

  /** write the long value */
  static void writeLong(long value, DataOutputStream out) throws IOException {
View Full Code Here

Examples of org.apache.hadoop.io.MapWritable.readFields()


  @Override
  public void readFields(DataInput in) throws IOException {
    MapWritable map = new MapWritable();
    map.readFields(in);
    setHeaders(fromMapWritable(map));
    byte[] body = null;
    int bodyLength = in.readInt();
    if(bodyLength != -1) {
      body = new byte[bodyLength];
View Full Code Here

Examples of org.apache.hadoop.io.ObjectWritable.readFields()

          && !stopReading; ++i) {

        if (i == list.size()) {
          if (objectClass == null) {
            ObjectWritable writable = new ObjectWritable();
            writable.readFields(stream);
            list.add(i, writable);
          } else {
            M obj = ReflectionUtils.newInstance(objectClass, conf);
            obj.readFields(stream);
            list.add(i, obj);
View Full Code Here

Examples of org.apache.hadoop.io.RandomDatum.readFields()

    DataInputStream originalIn = new DataInputStream(new BufferedInputStream(originalData));
    for(int i=0; i < count; ++i) {
      RandomDatum k1 = new RandomDatum();
      RandomDatum v1 = new RandomDatum();
      k1.readFields(originalIn);
      v1.readFields(originalIn);
     
      RandomDatum k2 = new RandomDatum();
      RandomDatum v2 = new RandomDatum();
      k2.readFields(inflateIn);
      v2.readFields(inflateIn);
View Full Code Here

Examples of org.apache.hadoop.io.ShortWritable.readFields()

  }

  /** read short value */
  static short readShort(DataInputStream in) throws IOException {
    ShortWritable uShort = TL_DATA.get().U_SHORT;
    uShort.readFields(in);
    return uShort.get();
  }

  /** write short value */
  static void writeShort(short value, DataOutputStream out) throws IOException {
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.