Exemplo n.º 1
0
 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);
   }
 }
Exemplo n.º 2
0
 public static final MR_long read(DataInput in) throws IOException {
   return new MR_long(WritableUtils.readVLong(in));
 }
Exemplo n.º 3
0
 public void readFields(DataInput in) throws IOException {
   value = WritableUtils.readVLong(in);
 }
Exemplo n.º 4
0
 public final void write(DataOutput out) throws IOException {
   out.writeByte(MRContainer.LONG);
   WritableUtils.writeVLong(out, value);
 }