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, int maxLength) throws IOException 

Source Link

Document

Read a UTF8 encoded string with a maximum size

Usage

From source file:org.voltdb.hadoop.VoltRecord.java

License:Open Source License

/**
 * De-serializes itself from the given {@linkplain DataInput} stream
 * It looks up the adapters cache for the data adapters associated
 * with this record's table name./*from   w  w w  . java2  s .  c  o  m*/
 */
@Override
public void readFields(DataInput in) throws IOException {
    setTableName(Text.readString(in, 512));
    DataAdapters adapters = DataAdapters.adaptersFor(m_table, null);
    if (adapters == null) {
        throw new IOException("no adapters configured for table " + m_table);
    }
    adapters.forInput().adapt(in, this);
}