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

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

Introduction

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

Prototype

public static void writeVInt(DataOutput out, int n) throws IOException 

Source Link

Document

Encoding an integer into a variable-length encoding format.

Usage

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

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    Utils.writeVInt(out, sourcePosition);
    Utils.writeVInt(out, targetPosition);
}

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

License:Apache License

@Override
public void write(DataOutput out) throws IOException {
    Utils.writeVInt(out, size());
    for (AlignmentWritable a : keySet()) {
        a.write(out);//from   w w  w  .j av  a  2s .  com
        Utils.writeVInt(out, get(a));
    }
}