Example usage for org.apache.hadoop.io.file.tfile Utils readVInt

List of usage examples for org.apache.hadoop.io.file.tfile Utils readVInt

Introduction

In this page you can find the example usage for org.apache.hadoop.io.file.tfile Utils readVInt.

Prototype

public static int readVInt(DataInput in) throws IOException 

Source Link

Document

Decoding the variable-length integer.

Usage

From source file:uk.ac.cam.eng.extraction.datatypes.AlignmentLink.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    sourcePosition = Utils.readVInt(in);
    targetPosition = Utils.readVInt(in);
}

From source file:uk.ac.cam.eng.extraction.hadoop.datatypes.AlignmentCountMapWritable.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    clear();//  ww w .  j  a v  a2  s  .  c o m
    int size = Utils.readVInt(in);
    for (int i = 0; i < size; ++i) {
        AlignmentWritable a = new AlignmentWritable();
        a.readFields(in);
        int alignmentCount = Utils.readVInt(in);
        put(a, alignmentCount);
    }
}