public static String getShortTextFormat(Message m) {
    if (m == null) {
      return "null";
    }
    if (m instanceof ScanRequest) {
      // This should be small and safe to output. No data.
      return TextFormat.shortDebugString(m);
    } else if (m instanceof RegionServerReportRequest) {
      // Print a short message only, just the servername and the requests, not the full load.
      RegionServerReportRequest r = (RegionServerReportRequest) m;
      return "server " + TextFormat.shortDebugString(r.getServer()) + " load { numberOfRequests: "
        + r.getLoad().getNumberOfRequests() + " }";
    } else if (m instanceof RegionServerStartupRequest) {
      // 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 the number of Actions
      int actionsCount =
        r.getRegionActionList().stream().mapToInt(ClientProtos.RegionAction::getActionCount).sum();

      // 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 "
        + actionsCount + " action(s) 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());
    } else if (m instanceof ClientProtos.CoprocessorServiceRequest) {
      ClientProtos.CoprocessorServiceRequest r = (ClientProtos.CoprocessorServiceRequest) m;
      return "coprocessorService= " + r.getCall().getServiceName() + ":"
        + r.getCall().getMethodName();
    } else if (m instanceof MasterProtos.MoveRegionRequest) {
      return TextFormat.shortDebugString(m);
    }
    return "TODO: " + m.getClass().toString();
  }
Return short version of Message toString'd, shorter than TextFormat#shortDebugString. Tries to
NOT print out data both because it can be big but also so we do not have data in our logs. Use
judiciously.
@return toString of passed <code>m</code>
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java