MutationProto firstMutate = mutations.get(0);
if (!region.getRegionInfo().isMetaTable()) {
cacheFlusher.reclaimMemStoreMemory();
}
byte [] row = firstMutate.getRow().toByteArray();
RowMutations rm = new RowMutations(row);
for (MutationProto mutate: mutations) {
MutationType type = mutate.getMutateType();
switch (mutate.getMutateType()) {
case PUT:
rm.add(ProtobufUtil.toPut(mutate, cellScanner));
break;
case DELETE:
rm.add(ProtobufUtil.toDelete(mutate, cellScanner));
break;
default:
throw new DoNotRetryIOException(
"mutate supports atomic put and/or delete, not "
+ type.name());