示例#1
0
 /**
  * Given an offset, populate vbytes with the associated set of deserialized value bytes. Should
  * only be called during a spill.
  */
 private void getVBytesForOffset(int kvoff, InMemValBytes vbytes) {
   final int nextindex =
       (kvoff / ACCTSIZE == (kvend - 1 + kvoffsets.length) % kvoffsets.length)
           ? bufend
           : kvindices[(kvoff + ACCTSIZE + KEYSTART) % kvindices.length];
   int vallen =
       (nextindex >= kvindices[kvoff + VALSTART])
           ? nextindex - kvindices[kvoff + VALSTART]
           : (bufvoid - kvindices[kvoff + VALSTART]) + nextindex;
   vbytes.reset(kvbuffer, kvindices[kvoff + VALSTART], vallen);
 }
示例#2
0
 /**
  * Given an offset, populate vbytes with the associated set of deserialized value bytes. Should
  * only be called during a spill.
  */
 int getVBytesForOffset(int kvoff, InMemValBytes vbytes) {
   int vallen = getInMemVBytesLength(kvoff);
   vbytes.reset(kvbuffer, kvmeta.get(kvoff + VALSTART), vallen);
   return vallen;
 }