public static final int compare(byte[] x, int xs, int xl, byte[] y, int ys, int yl, int[] size) { try { size[0] = 1 + WritableUtils.decodeVIntSize(x[xs]); long v = WritableComparator.readVLong(x, xs) - WritableComparator.readVLong(y, ys); return (v == 0) ? 0 : ((v > 0) ? 1 : -1); } catch (IOException e) { throw new Error(e); } }
public static final MR_long read(DataInput in) throws IOException { return new MR_long(WritableUtils.readVLong(in)); }
public void readFields(DataInput in) throws IOException { value = WritableUtils.readVLong(in); }
public final void write(DataOutput out) throws IOException { out.writeByte(MRContainer.LONG); WritableUtils.writeVLong(out, value); }