コード例 #1
0
 /* (non-Javadoc)
  * @see eu.stratosphere.pact.runtime.plugable.TypeAccessorsV2#deserialize(java.lang.Object, eu.stratosphere.nephele.services.memorymanager.DataInputView)
  */
 @Override
 public void deserialize(LongPair target, DataInputViewV2 source) throws IOException {
   target.setKey(source.readLong());
   target.setValue(source.readLong());
 }
コード例 #2
0
 /* (non-Javadoc)
  * @see eu.stratosphere.pact.runtime.plugable.TypeAccessorsV2#copy(eu.stratosphere.nephele.services.memorymanager.DataInputView, eu.stratosphere.nephele.services.memorymanager.DataOutputView)
  */
 @Override
 public void copy(DataInputViewV2 source, DataOutputViewV2 target) throws IOException {
   for (int i = 0; i < 16; i++) {
     target.writeByte(source.readUnsignedByte());
   }
 }
コード例 #3
0
 /* (non-Javadoc)
  * @see eu.stratosphere.pact.runtime.plugable.TypeAccessorsV2#compare(eu.stratosphere.nephele.services.memorymanager.DataInputView, eu.stratosphere.nephele.services.memorymanager.DataInputView)
  */
 @Override
 public int compare(DataInputViewV2 source1, DataInputViewV2 source2) throws IOException {
   long diff = source1.readLong() - source2.readLong();
   return diff < 0 ? -1 : diff > 0 ? 1 : 0;
 }