use of org.janusgraph.diskstorage.Entry in project janusgraph by JanusGraph.
the class KCVSCacheTest method loadStore.
public void loadStore(int numKeys, int numCols) {
StoreTransaction tx = getStoreTx();
try {
for (int i = 1; i <= numKeys; i++) {
final List<Entry> adds = new ArrayList<>(numCols);
for (int j = 1; j <= numCols; j++) adds.add(getEntry(j, j));
store.mutate(BufferUtil.getIntBuffer(i), adds, KeyColumnValueStore.NO_DELETIONS, tx);
}
tx.commit();
} catch (BackendException e) {
throw new RuntimeException(e);
}
}
use of org.janusgraph.diskstorage.Entry in project janusgraph by JanusGraph.
the class StaticArrayEntryTest method testToString.
@Test
public void testToString() {
long l = random.nextLong();
StaticBuffer b = BufferUtil.getLongBuffer(l);
int column = b.getInt(0);
int value = b.getInt(4);
Entry entry = new StaticArrayEntry(b, 4);
final String[] split = entry.toString().split("->");
assertEquals(String.format("0x%08X", column), split[0]);
assertEquals(String.format("0x%08X", value), split[1]);
}
Aggregations