Source:
private void addProtoToStore(CorfuRuntime rt, final int count) { CorfuStore corfuStore = new CorfuStore(rt); final String nsxManager = "nsx-manager-namespace5"; final String tableName = "EventInfo"; System.out.println("Start Writing Proto" + System.currentTimeMillis()); long start = System.currentTimeMillis(); Table<Uuid, EventInfo, ManagedResources> table = null; try { table = corfuStore.openTable( nsxManager, tableName, Uuid.class, EventInfo.class, ManagedResources.class, TableOptions.builder().build()); } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { e.printStackTrace(); } List<Uuid> uuids = new ArrayList<>(); List<EventInfo> events = new ArrayList<>(); CorfuStoreMetadata.Timestamp timestamp = corfuStore.getTimestamp(); ManagedResources metadata = ManagedResources.newBuilder().setCreateUser("Pan").build(); TxnContext tx = corfuStore.txn(nsxManager); assert table != null; tx.putRecord(table, Uuid.newBuilder().setLsb(0L).setMsb(0L).build(), SampleSchema.EventInfo.newBuilder().setName("simpleCRUD").build(), metadata); tx.commit(); for (int i = 0; i < count; i++) { TxnContext txn = corfuStore.txn(nsxManager); UUID uuid = UUID.nameUUIDFromBytes(Integer.toString(i).getBytes()); Uuid uuidMsg = Uuid.newBuilder() .setMsb(uuid.getMostSignificantBits()) .setLsb(uuid.getLeastSignificantBits()) .build(); uuids.add(uuidMsg); events.add(SampleSchema.EventInfo.newBuilder() .setId(i) .setName("event_" + i) .setEventTime(i) .build()); txn.putRecord(table, uuids.get(i), events.get(i), metadata); txn.commit(); } long end = System.currentTimeMillis(); System.out.println("Time Taken: " + (end - start)); System.out.println("End Writing Proto" + System.currentTimeMillis()); }

Target:
private void addProtoToStore(CorfuRuntime rt, final int count) { CorfuStore corfuStore = new CorfuStore(rt); final String nsxManager = "nsx-manager-namespace5"; final String tableName = "EventInfo"; System.out.println("Start Writing Proto" + System.currentTimeMillis()); long start = System.currentTimeMillis(); Table<Uuid, EventInfo, ManagedResources> table = null; try { table = corfuStore.openTable( nsxManager, tableName, Uuid.class, EventInfo.class, ManagedResources.class, TableOptions.builder().build()); } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { e.printStackTrace(); } List<Uuid> uuids = new ArrayList<>(); List<EventInfo> events = new ArrayList<>(); CorfuStoreMetadata.Timestamp timestamp = corfuStore.getTimestamp(); ManagedResources metadata = ManagedResources.newBuilder().setCreateUser("Pan").build(); TxnContext tx = corfuStore.txn(nsxManager); assertThat(table).isNotNull(); tx.putRecord(table, Uuid.newBuilder().setLsb(0L).setMsb(0L).build(), SampleSchema.EventInfo.newBuilder().setName("simpleCRUD").build(), metadata); tx.commit(); for (int i = 0; i < count; i++) { TxnContext txn = corfuStore.txn(nsxManager); UUID uuid = UUID.nameUUIDFromBytes(Integer.toString(i).getBytes()); Uuid uuidMsg = Uuid.newBuilder() .setMsb(uuid.getMostSignificantBits()) .setLsb(uuid.getLeastSignificantBits()) .build(); uuids.add(uuidMsg); events.add(SampleSchema.EventInfo.newBuilder() .setId(i) .setName("event_" + i) .setEventTime(i) .build()); txn.putRecord(table, uuids.get(i), events.get(i), metadata); txn.commit(); } long end = System.currentTimeMillis(); System.out.println("Time Taken: " + (end - start)); System.out.println("End Writing Proto" + System.currentTimeMillis()); }