/** * Take the segment reference from {@link #getValueRefs(byte[], int, List)} * result and makes it self-contained - adds byte array where the value is stored, and * updates the offset from "global" write buffers offset to offset within that array. */ public void populateValue(WriteBuffers.ByteSegmentRef valueRef) { writeBuffers.populateValue(valueRef); }
/** * Take the segment reference from {@link #getValueRefs(byte[], int, List)} * result and makes it self-contained - adds byte array where the value is stored, and * updates the offset from "global" write buffers offset to offset within that array. */ public void populateValue(WriteBuffers.ByteSegmentRef valueRef) { writeBuffers.populateValue(valueRef); }
public void getByteSegmentRefToCurrent(ByteSegmentRef byteSegmentRef, int length, Position readPos) { byteSegmentRef.reset((readPos.bufferIndex * (long)wbSize) + readPos.offset, length); if (length > 0) { populateValue(byteSegmentRef); } }
private void debugDumpKeyProbe(long keyOffset, int keyLength, int hashCode, int finalSlot) { final int bucketMask = refs.length - 1; WriteBuffers.ByteSegmentRef fakeRef = new WriteBuffers.ByteSegmentRef(keyOffset, keyLength); writeBuffers.populateValue(fakeRef); int slot = hashCode & bucketMask; long probeSlot = slot; StringBuilder sb = new StringBuilder("Probe path debug for ["); sb.append(Utils.toStringBinary( fakeRef.getBytes(), (int)fakeRef.getOffset(), fakeRef.getLength())); sb.append("] hashCode ").append(Integer.toBinaryString(hashCode)).append(" is: "); int i = 0; while (slot != finalSlot) { probeSlot += (++i); slot = (int)(probeSlot & bucketMask); sb.append(slot).append(" - ").append(probeSlot).append(" - ") .append(Long.toBinaryString(refs[slot])).append("\n"); } LOG.info(sb.toString()); } }
private void debugDumpKeyProbe(long keyOffset, int keyLength, int hashCode, int finalSlot) { final int bucketMask = refs.length - 1; WriteBuffers.ByteSegmentRef fakeRef = new WriteBuffers.ByteSegmentRef(keyOffset, keyLength); writeBuffers.populateValue(fakeRef); int slot = hashCode & bucketMask; long probeSlot = slot; StringBuilder sb = new StringBuilder("Probe path debug for ["); sb.append(Utils.toStringBinary( fakeRef.getBytes(), (int)fakeRef.getOffset(), fakeRef.getLength())); sb.append("] hashCode ").append(Integer.toBinaryString(hashCode)).append(" is: "); int i = 0; while (slot != finalSlot) { probeSlot += (++i); slot = (int)(probeSlot & bucketMask); sb.append(slot).append(" - ").append(probeSlot).append(" - ") .append(Long.toBinaryString(refs[slot])).append("\n"); } LOG.info(sb.toString()); } }
WriteBuffers.ByteSegmentRef fakeRef = new WriteBuffers.ByteSegmentRef(keyOffset, keyLength); byteIntervals.put(keyOffset - 4, keyLength + 4); writeBuffers.populateValue(fakeRef); System.arraycopy(fakeRef.getBytes(), (int)fakeRef.getOffset(), key, 0, keyLength); dump.append(Utils.toStringBinary(key, 0, key.length)).append(" ref [").append(dumpRef(ref))
WriteBuffers.ByteSegmentRef fakeRef = new WriteBuffers.ByteSegmentRef(keyOffset, keyLength); byteIntervals.put(keyOffset - 4, keyLength + 4); writeBuffers.populateValue(fakeRef); System.arraycopy(fakeRef.getBytes(), (int)fakeRef.getOffset(), key, 0, keyLength); dump.append(Utils.toStringBinary(key, 0, key.length)).append(" ref [").append(dumpRef(ref))
hashMap.writeBuffers.populateValue(byteSegmentRef); hashMap.writeBuffers.populateValue(byteSegmentRef); hashMap.writeBuffers.populateValue(byteSegmentRef);
hashMap.writeBuffers.populateValue(byteSegmentRef); hashMap.writeBuffers.populateValue(byteSegmentRef); hashMap.writeBuffers.populateValue(byteSegmentRef);
writeBuffers.populateValue(keyRef);
/** * Take the segment reference from {@link #getValueRefs(byte[], int, List)} * result and makes it self-contained - adds byte array where the value is stored, and * updates the offset from "global" write buffers offset to offset within that array. */ public void populateValue(WriteBuffers.ByteSegmentRef valueRef) { writeBuffers.populateValue(valueRef); }
public void getByteSegmentRefToCurrent(ByteSegmentRef byteSegmentRef, int length, Position readPos) { byteSegmentRef.reset((readPos.bufferIndex * (long)wbSize) + readPos.offset, length); if (length > 0) { populateValue(byteSegmentRef); } }
public void getByteSegmentRefToCurrent(ByteSegmentRef byteSegmentRef, int length, Position readPos) { byteSegmentRef.reset((readPos.bufferIndex * (long)wbSize) + readPos.offset, length); if (length > 0) { populateValue(byteSegmentRef); } }
public void getByteSegmentRefToCurrent(ByteSegmentRef byteSegmentRef, int length, Position readPos) { byteSegmentRef.reset((readPos.bufferIndex * (long)wbSize) + readPos.offset, length); if (length > 0) { populateValue(byteSegmentRef); } }
public void getByteSegmentRefToCurrent(ByteSegmentRef byteSegmentRef, int length, Position readPos) { byteSegmentRef.reset((readPos.bufferIndex * (long)wbSize) + readPos.offset, length); if (length > 0) { populateValue(byteSegmentRef); } }
private void debugDumpKeyProbe(long keyOffset, int keyLength, int hashCode, int finalSlot) { final int bucketMask = refs.length - 1; WriteBuffers.ByteSegmentRef fakeRef = new WriteBuffers.ByteSegmentRef(keyOffset, keyLength); writeBuffers.populateValue(fakeRef); int slot = hashCode & bucketMask; long probeSlot = slot; StringBuilder sb = new StringBuilder("Probe path debug for ["); sb.append(Utils.toStringBinary( fakeRef.getBytes(), (int)fakeRef.getOffset(), fakeRef.getLength())); sb.append("] hashCode ").append(Integer.toBinaryString(hashCode)).append(" is: "); int i = 0; while (slot != finalSlot) { probeSlot += (++i); slot = (int)(probeSlot & bucketMask); sb.append(slot).append(" - ").append(probeSlot).append(" - ") .append(Long.toBinaryString(refs[slot])).append("\n"); } LOG.info(sb.toString()); } }
WriteBuffers.ByteSegmentRef fakeRef = new WriteBuffers.ByteSegmentRef(keyOffset, keyLength); byteIntervals.put(keyOffset - 4, keyLength + 4); writeBuffers.populateValue(fakeRef); System.arraycopy(fakeRef.getBytes(), (int)fakeRef.getOffset(), key, 0, keyLength); dump.append(Utils.toStringBinary(key, 0, key.length)).append(" ref [").append(dumpRef(ref))
hashMap.writeBuffers.populateValue(byteSegmentRef); hashMap.writeBuffers.populateValue(byteSegmentRef); hashMap.writeBuffers.populateValue(byteSegmentRef);