@Override public void completeMiniBatchOperations( final MiniBatchOperationInProgress<Mutation> miniBatchOp, final WriteEntry writeEntry) throws IOException { // TODO: can it be done after completing mvcc? // calling the post CP hook for batch mutation if (region.coprocessorHost != null) { region.coprocessorHost.postBatchMutate(miniBatchOp); } super.completeMiniBatchOperations(miniBatchOp, writeEntry); }
new MiniBatchOperationInProgress<Mutation>(batchOp.getMutationsForCoprocs(), batchOp.retCodeDetails, batchOp.walEditsFromCoprocessors, firstIndex, lastIndexExclusive); coprocessorHost.postBatchMutate(miniBatchOp);
.when(mockedCPHost).postBatchMutate(Mockito.<MiniBatchOperationInProgress<Mutation>>any()); region.setCoprocessorHost(mockedCPHost);
@Override public void postBatchMutate(HRegion region) throws IOException { RegionCoprocessorHost coprocessorHost = region.getCoprocessorHost(); if (coprocessorHost != null) { assert miniBatch != null; // Use the same miniBatch state used to call the preBatchMutate() coprocessorHost.postBatchMutate(miniBatch); } }
.when(mockedCPHost).postBatchMutate(Mockito.<MiniBatchOperationInProgress<Mutation>>any()); region.setCoprocessorHost(mockedCPHost);
new MiniBatchOperationInProgress<Pair<Mutation, Integer>>(batchOp.operations, batchOp.retCodeDetails, batchOp.walEditsFromCoprocessors, firstIndex, lastIndexExclusive); coprocessorHost.postBatchMutate(miniBatchOp);