diff --git a/src/java/org/apache/cassandra/db/NativeDecoratedKey.java b/src/java/org/apache/cassandra/db/NativeDecoratedKey.java index e824b9716515..019209ec9e2b 100644 --- a/src/java/org/apache/cassandra/db/NativeDecoratedKey.java +++ b/src/java/org/apache/cassandra/db/NativeDecoratedKey.java @@ -46,10 +46,4 @@ public ByteBuffer getKey() { return MemoryUtil.getByteBuffer(peer + 4, MemoryUtil.getInt(peer), ByteOrder.BIG_ENDIAN); } - - @Override - public DecoratedKey onHeapCopy() - { - return new BufferDecoratedKey(getToken(), HeapAllocator.instance.clone(getKey())); - } } diff --git a/src/java/org/apache/cassandra/db/rows/NativeCell.java b/src/java/org/apache/cassandra/db/rows/NativeCell.java index 3312c1ebf788..9d816f319dbf 100644 --- a/src/java/org/apache/cassandra/db/rows/NativeCell.java +++ b/src/java/org/apache/cassandra/db/rows/NativeCell.java @@ -109,39 +109,27 @@ private static long simpleSize(int length) public long timestamp() { - if (peer == 0) - throw new IllegalStateException(); return MemoryUtil.getLong(peer + TIMESTAMP); } public int ttl() { - if (peer == 0) - throw new IllegalStateException(); return MemoryUtil.getInt(peer + TTL); } public int localDeletionTime() { - if (peer == 0) - throw new IllegalStateException(); return MemoryUtil.getInt(peer + DELETION); } public ByteBuffer value() { - if (peer == 0) - throw new IllegalStateException(); - int length = MemoryUtil.getInt(peer + LENGTH); return MemoryUtil.getByteBuffer(peer + VALUE, length, ByteOrder.BIG_ENDIAN); } public CellPath path() { - if (peer == 0) - throw new IllegalStateException(); - if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0) return null;