// Should be small enough.
return TextFormat.shortDebugString(m);
} else if (m instanceof MutationProto) {
return toShortString((MutationProto)m);
} else if (m instanceof GetRequest) {
GetRequest r = (GetRequest) m;
return "region= " + getStringForByteString(r.getRegion().getValue()) +
", row=" + getStringForByteString(r.getGet().getRow());
} else if (m instanceof ClientProtos.MultiRequest) {
ClientProtos.MultiRequest r = (ClientProtos.MultiRequest) m;
// Get first set of Actions.
ClientProtos.RegionAction actions = r.getRegionActionList().get(0);
String row = actions.getActionCount() <= 0? "":
getStringForByteString(actions.getAction(0).hasGet()?
actions.getAction(0).getGet().getRow():
actions.getAction(0).getMutation().getRow());
return "region= " + getStringForByteString(actions.getRegion().getValue()) +
", for " + r.getRegionActionCount() +
" actions and 1st row key=" + row;
} else if (m instanceof ClientProtos.MutateRequest) {
ClientProtos.MutateRequest r = (ClientProtos.MutateRequest) m;
return "region= " + getStringForByteString(r.getRegion().getValue()) +
", row=" + getStringForByteString(r.getMutation().getRow());
}
return "TODO: " + m.getClass().toString();
}