Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-14443

Add request parameter to the TooSlow/TooLarge warn message of RpcServer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Abandoned
    • 1.2.1
    • None
    • IPC/RPC, Operability
    • None

    Description

      The RpcServer will log a warn message for TooSlow or TooLarge request as:

              logResponse(new Object[]{param},
                  md.getName(), md.getName() + "(" + param.getClass().getName() + ")",
                  (tooLarge ? "TooLarge" : "TooSlow"),
                  status.getClient(), startTime, processingTime, qTime,
                  responseSize);
      

      The RpcServer#logResponse will create the warn message as:

      if (params.length == 2 && server instanceof HRegionServer &&
              params[0] instanceof byte[] &&
              params[1] instanceof Operation) {
            ...
            responseInfo.putAll(((Operation) params[1]).toMap());
            ...
          } else if (params.length == 1 && server instanceof HRegionServer &&
              params[0] instanceof Operation) {
            ...
            responseInfo.putAll(((Operation) params[0]).toMap());
            ...
          } else {
            ...
          }
      

      Because the parameter is always a protobuf message, not an instance of Operation, the request parameter will not be added into the warn message. The parameter is helpful to find out the problem, for example, knowing the startRow/endRow is useful for a TooSlow scan. To improve the warn message, we can transform the protobuf request message to corresponding Operation subclass object by ProtobufUtil, so that it can be added the warn message. Suggestion and discussion are welcomed.

      Attachments

        1. HBASE-14443-trunk-v2.patch
          10 kB
          Jianwei Cui
        2. HBASE-14443-trunk-v1.patch
          11 kB
          Jianwei Cui

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cuijianwei Jianwei Cui
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: