コード例 #1
0
 @Override
 public int compare(DataInputView source1, DataInputView source2) throws IOException {
   final long diff = source1.readLong() - source2.readLong();
   return diff < 0 ? -1 : diff > 0 ? 1 : 0;
 }
コード例 #2
0
 @Override
 public void readWithKeyDenormalization(VertexWithRank record, DataInputView source)
     throws IOException {
   record.setVertexID(source.readLong() + Long.MIN_VALUE);
   record.setRank(source.readDouble());
 }