Example usage for org.apache.hadoop.io WritableUtils readStringSafely

List of usage examples for org.apache.hadoop.io WritableUtils readStringSafely

Introduction

In this page you can find the example usage for org.apache.hadoop.io WritableUtils readStringSafely.

Prototype

public static String readStringSafely(DataInput in, int maxLength)
        throws IOException, IllegalArgumentException 

Source Link

Document

Read a string, but check it for sanity.

Usage

From source file:org.apache.tez.engine.common.shuffle.impl.ShuffleHeader.java

License:Apache License

public void readFields(DataInput in) throws IOException {
    mapId = WritableUtils.readStringSafely(in, MAX_ID_LENGTH);
    compressedLength = WritableUtils.readVLong(in);
    uncompressedLength = WritableUtils.readVLong(in);
    forReduce = WritableUtils.readVInt(in);
}