/** * Helper method that checks and prepares only one mutation. This can be used to implement * {@link #checkAndPrepare()} for entire Batch. * NOTE: As CP prePut()/ preDelete() hooks may modify mutations, this method should be called * after prePut()/ preDelete() CP hooks are run for the mutation */ protected void checkAndPrepareMutation(Mutation mutation, final long timestamp) throws IOException { region.checkRow(mutation.getRow(), "batchMutate"); if (mutation instanceof Put) { // Check the families in the put. If bad, skip this one. checkAndPreparePut((Put) mutation); region.checkTimestamps(mutation.getFamilyCellMap(), timestamp); } else { region.prepareDelete((Delete) mutation); } }