Example usage for org.apache.hadoop.io Text readString

List of usage examples for org.apache.hadoop.io Text readString

Introduction

In this page you can find the example usage for org.apache.hadoop.io Text readString.

Prototype

public static String readString(DataInput in) throws IOException 

Source Link

Document

Read a UTF8 encoded string from in

Usage

From source file:crunch.MaxTemperature.java

License:Apache License

public void readFields(DataInput __dataIn) throws IOException {
        if (__dataIn.readBoolean()) {
            this.id = null;
        } else {/*from  w w w  . j a va2s .  com*/
            this.id = Integer.valueOf(__dataIn.readInt());
        }
        if (__dataIn.readBoolean()) {
            this.widget_name = null;
        } else {
            this.widget_name = Text.readString(__dataIn);
        }
        if (__dataIn.readBoolean()) {
            this.price = null;
        } else {
            this.price = com.cloudera.sqoop.lib.BigDecimalSerializer.readFields(__dataIn);
        }
        if (__dataIn.readBoolean()) {
            this.design_date = null;
        } else {
            this.design_date = new Date(__dataIn.readLong());
        }
        if (__dataIn.readBoolean()) {
            this.version = null;
        } else {
            this.version = Integer.valueOf(__dataIn.readInt());
        }
        if (__dataIn.readBoolean()) {
            this.design_comment = null;
        } else {
            this.design_comment = Text.readString(__dataIn);
        }
    }

From source file:edu.iu.common.MultiFileSplit.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    int size = in.readInt();
    files = new ArrayList<Path>(size);
    for (int i = 0; i < size; i++) {
        Path file = new Path(Text.readString(in));
        files.add(file);/*from  ww w.j  ava 2 s.co m*/
    }
    length = in.readLong();
    hosts = null;
}

From source file:edu.iu.fileformat.MultiFileSplit.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    int size = in.readInt();
    files = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        Path file = new Path(Text.readString(in));
        files.add(file);//from w ww.  j av a2 s. co  m
    }
    length = in.readLong();
    hosts = null;
}

From source file:edu.uci.ics.hyracks.dataflow.hadoop.mapreduce.InputFileSplit.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    file = new Path(Text.readString(in));
    start = in.readLong();/*from   www.j a v  a2  s .com*/
    length = in.readLong();
    hosts = null;
    this.blockId = in.readInt();
    this.scheduleTime = in.readLong();
}

From source file:edu.umd.cloud9.io.pair.PairOfFloatString.java

License:Apache License

/**
 * Deserializes the pair.// w  w w  . ja v  a  2  s.c  om
 *
 * @param in source for raw byte representation
 */
public void readFields(DataInput in) throws IOException {
    leftElement = in.readFloat();
    rightElement = Text.readString(in);
}

From source file:edu.umd.cloud9.io.pair.PairOfIntString.java

License:Apache License

/**
 * Deserializes the pair./* w w  w  . ja v a 2s  .  c  om*/
 *
 * @param in source for raw byte representation
 */
public void readFields(DataInput in) throws IOException {
    leftElement = in.readInt();
    rightElement = Text.readString(in);
}

From source file:edu.umd.cloud9.io.pair.PairOfLongString.java

License:Apache License

/**
 * Deserializes the pair.// w  w w  .  ja va  2  s .com
 *
 * @param in source for raw byte representation
 */
public void readFields(DataInput in) throws IOException {
    leftElement = in.readLong();
    rightElement = Text.readString(in);
}

From source file:edu.umd.cloud9.io.pair.PairOfStringFloat.java

License:Apache License

/**
 * Deserializes the pair.//from  w ww .  ja  va 2 s  . c  o m
 *
 * @param in source for raw byte representation
 */
public void readFields(DataInput in) throws IOException {
    leftElement = Text.readString(in);
    rightElement = in.readFloat();
}

From source file:edu.umd.cloud9.io.pair.PairOfStringInt.java

License:Apache License

/**
 * Deserializes the pair./*  ww  w . j a  v a  2s.c  o  m*/
 *
 * @param in source for raw byte representation
 */
public void readFields(DataInput in) throws IOException {
    leftElement = Text.readString(in);
    rightElement = in.readInt();
}

From source file:edu.umd.cloud9.io.pair.PairOfStringLong.java

License:Apache License

/**
 * Deserializes the pair.//from   w  ww  . jav  a  2s . co  m
 *
 * @param in source for raw byte representation
 */
public void readFields(DataInput in) throws IOException {
    leftElement = Text.readString(in);
    rightElement = in.readLong();
}