HBase
  1. HBase
  2. HBASE-3424

Coprocessors: Add metrics for custom RPC methods called through HTable.coprocessorExec()

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Coprocessors, IPC/RPC
    • Labels:
      None

      Description

      Currently HBaseRpcMetrics only reports on known RPC methods in core HBase. With HBASE-3405 we added hooks to register metrics for new methods. We can make use of these for tabulating metrics on custom CoprocessorProtocol extensions invoked through HTable.coprocessorProxy() and HTable.coprocessorExec().

        Activity

        Hide
        Otis Gospodnetic added a comment -

        I don't follow if this issue represents something that needs to be implemented? It sounds like it's just pointing to HBASE-3405. Or maybe this is a placeholder for future patches for metrics around Coprocessors?

        Show
        Otis Gospodnetic added a comment - I don't follow if this issue represents something that needs to be implemented? It sounds like it's just pointing to HBASE-3405 . Or maybe this is a placeholder for future patches for metrics around Coprocessors?
        Hide
        Gary Helmling added a comment -

        Sorry, I skipped quite a bit of background explanation here. Yes, this still needs to be implemented within the coprocessor framework – specifically within HRegion.exec().

        The idea is that if you define a custom protocol for your coprocessor, like:

        public interface RowCountProtocol extends CoprocessorProtocol {
            public long count();
            public long countForQualifier(byte[] family, byte[] qualifier)
        }
        

        This is ultimately invoked on the region server by a call to HRegionInterface.execCoprocessor(). Current RPC metrics would contains stats for the number of invocations of execCoprocessor() but this doesn't tell you anything about what RowCountProtocol method was actually invoked.

        So in HRegion.exec() we would add some code to increment metrics on the wrapped RowCountProtocol method being called by Method.invoke(). Then you would also have individual RPC metrics for RowCountProtocol.count() and RowCountProtocol.countForQualifier().

        Show
        Gary Helmling added a comment - Sorry, I skipped quite a bit of background explanation here. Yes, this still needs to be implemented within the coprocessor framework – specifically within HRegion.exec() . The idea is that if you define a custom protocol for your coprocessor, like: public interface RowCountProtocol extends CoprocessorProtocol { public long count(); public long countForQualifier(byte[] family, byte[] qualifier) } This is ultimately invoked on the region server by a call to HRegionInterface.execCoprocessor() . Current RPC metrics would contains stats for the number of invocations of execCoprocessor() but this doesn't tell you anything about what RowCountProtocol method was actually invoked. So in HRegion.exec() we would add some code to increment metrics on the wrapped RowCountProtocol method being called by Method.invoke() . Then you would also have individual RPC metrics for RowCountProtocol.count() and RowCountProtocol.countForQualifier() .
        Hide
        Andrew Purtell added a comment -

        Close this Gary Helmling? I think it's still interesting but I don't see anyone getting to it right away.

        Show
        Andrew Purtell added a comment - Close this Gary Helmling ? I think it's still interesting but I don't see anyone getting to it right away.

          People

          • Assignee:
            Unassigned
            Reporter:
            Gary Helmling
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development