/** Used by tests to stress off-heap memory compaction. * */ public static void forceCompaction() { getAllocator().freeList.compact(0); }
public static byte[] getBaseRowBytes(final UnsafeWrapper unsafe, final long baseAddr, final int bytesLen) { // If the row does not have any lobs, the offheap byte source is not // serialized, else it is serialized byte[] result = new byte[bytesLen]; UnsafeMemoryChunk.readUnsafeBytes(unsafe, baseAddr, result, bytesLen); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); return result; }
public static byte[] getBaseRowBytes(final UnsafeWrapper unsafe, final long baseAddr, final int bytesLen) { // If the row does not have any lobs, the offheap byte source is not // serialized, else it is serialized byte[] result = new byte[bytesLen]; UnsafeMemoryChunk.readUnsafeBytes(unsafe, baseAddr, result, bytesLen); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); return result; }
public final void serializeGfxdBytesWithStats(int index, DataOutput out) throws IOException { serializeGfxdBytes(index, out); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); }
public final void serializeGfxdBytesWithStats(int index, DataOutput out) throws IOException { serializeGfxdBytes(index, out); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); }
public final void serializeGfxdBytesWithStats(int index, DataOutput out) throws IOException { serializeGfxdBytes(index, out); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); }
@Override public ChunkType getChunkType() { return SimpleMemoryAllocatorImpl.getAllocator().getChunkFactory().getChunkTypeForAddress(getMemoryAddress()); } public static int getSrcTypeOrdinal(long memAddr) {
public static byte[] getBaseRowBytes(final long baseAddr, final int bytesLen) { // If the row does not have any lobs, the offheap byte source is not // serialized, else it is serialized byte[] result = new byte[bytesLen]; UnsafeMemoryChunk.readUnsafeBytes(baseAddr, result, bytesLen); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); return result; }
@Override public ChunkType getChunkType() { return getAllocator().getChunkFactory().getChunkTypeForAddress(getMemoryAddress()); } public static int getSrcTypeOrdinal(long memAddr) {
protected byte[] getRawBytes() { byte[] result = new byte[getDataSize()]; readBytes(0, result); //debugLog("reading", true); getAllocator().getStats().incReads(); if (isCompressed()) { result = getAllocator().getCompressor().decompress(result); } return result; }
/** * Returns the raw possibly compressed bytes of this chunk */ public byte[] getCompressedBytes() { byte[] result = new byte[getDataSize()]; readBytes(0, result); //debugLog("reading", true); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); return result; } protected byte[] getRawBytes() {
final byte[] getFullDataBytes() { int dataSize = getDataSize(); byte[] result = new byte[dataSize]; super.readBytes(0, result, 0, dataSize); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); return result; }
public static void serializeBaseRowBytes(final UnsafeWrapper unsafe, final long baseAddr, final int bytesLen, final DataOutput out) throws IOException { // If the row does not have any lobs, the offheap byte source is not // serialized, else it is serialized InternalDataSerializer.writeArrayLength(bytesLen, out); OffHeapRegionEntryHelper.copyBytesToDataOutput(unsafe, baseAddr, bytesLen, out); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); }
public static void serializeBaseRowBytes(final UnsafeWrapper unsafe, final long baseAddr, final int bytesLen, final DataOutput out) throws IOException { // If the row does not have any lobs, the offheap byte source is not // serialized, else it is serialized InternalDataSerializer.writeArrayLength(bytesLen, out); OffHeapRegionEntryHelper.copyBytesToDataOutput(unsafe, baseAddr, bytesLen, out); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); }
final byte[] getFullDataBytes() { int dataSize = getDataSize(); byte[] result = new byte[dataSize]; super.readBytes(0, result, 0, dataSize); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); return result; }
public static void serializeBaseRowBytes(final UnsafeWrapper unsafe, final long baseAddr, final int bytesLen, final DataOutput out) throws IOException { // If the row does not have any lobs, the offheap byte source is not // serialized, else it is serialized InternalDataSerializer.writeArrayLength(bytesLen, out); OffHeapRegionEntryHelper.copyBytesToDataOutput(unsafe, baseAddr, bytesLen, out); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); }
final byte[] getFullDataBytes() { int dataSize = getDataSize(); byte[] result = new byte[dataSize]; super.readBytes(0, result, 0, dataSize); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); return result; }
public void toData(final DataOutput out) throws IOException { if (GemFireXDUtils.TraceRSIter) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_RSITER, "OffHeapByteSource.toData: serializing offheap byte source=" + this); } final UnsafeWrapper unsafe = UnsafeMemoryChunk.getUnsafeWrapper(); final int offsetAdjustment = getOffsetAdjustment(); final int len = getDataSize(unsafe, this.memoryAddress) - offsetAdjustment; serializeBaseRowBytes(unsafe, getBaseDataAddress() + offsetAdjustment, len, out); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); }
public void toData(final DataOutput out) throws IOException { if (GemFireXDUtils.TraceRSIter) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_RSITER, "OffHeapByteSource.toData: serializing offheap byte source=" + this); } final UnsafeWrapper unsafe = UnsafeMemoryChunk.getUnsafeWrapper(); final int offsetAdjustment = getOffsetAdjustment(); final int len = getDataSize(unsafe, this.memoryAddress) - offsetAdjustment; serializeBaseRowBytes(unsafe, getBaseDataAddress() + offsetAdjustment, len, out); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); }
public void toData(final DataOutput out) throws IOException { if (GemFireXDUtils.TraceRSIter) { SanityManager.DEBUG_PRINT(GfxdConstants.TRACE_RSITER, "OffHeapByteSource.toData: serializing offheap byte source=" + this); } final UnsafeWrapper unsafe = UnsafeMemoryChunk.getUnsafeWrapper(); final int offsetAdjustment = getOffsetAdjustment(); final int len = getDataSize(unsafe, this.memoryAddress) - offsetAdjustment; serializeBaseRowBytes(unsafe, getBaseDataAddress() + offsetAdjustment, len, out); SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads(); }