use of org.janusgraph.diskstorage.keycolumnvalue.KeyRange in project janusgraph by JanusGraph.
the class CassandraHelperTest method testTransformRangeWithRollingCarry.
@Test
public void testTransformRangeWithRollingCarry() {
BytesToken token2 = new BytesToken(new byte[] { 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 });
KeyRange keyRange = CassandraHelper.transformRange(ZERO, token2);
Assert.assertArrayEquals(new byte[] { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, keyRange.getEnd().asByteBuffer().array());
}
use of org.janusgraph.diskstorage.keycolumnvalue.KeyRange in project janusgraph by JanusGraph.
the class CassandraHelperTest method testTransformRange.
@Test
public void testTransformRange() {
BytesToken token2 = new BytesToken(new byte[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1 });
KeyRange keyRange = CassandraHelper.transformRange(ZERO, token2);
Assert.assertArrayEquals(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, keyRange.getStart().asByteBuffer().array());
Assert.assertArrayEquals(new byte[] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 0 }, keyRange.getEnd().asByteBuffer().array());
}
Aggregations