Example usage for org.apache.hadoop.io BytesWritable getLength

List of usage examples for org.apache.hadoop.io BytesWritable getLength

Introduction

In this page you can find the example usage for org.apache.hadoop.io BytesWritable getLength.

Prototype

@Override
public int getLength() 

Source Link

Document

Get the current size of the buffer.

Usage

From source file:voldemort.store.readonly.mr.utils.HadoopUtils.java

License:Apache License

/**
 * read and return integer from the END of BytesWritable The tag bytes are
 * NOT removed/* www.  j  a  va  2s  .c  o  m*/
 */
public static int readTag(BytesWritable readable) {
    return ByteUtils.readInt(readable.getBytes(), readable.getLength() - 4);
}