HBase
  1. HBase
  2. HBASE-7688

Master coprocessor RPCs don't propagate exceptions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.95.2
    • Fix Version/s: 0.95.0
    • Component/s: Protobufs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      I was working on some coprocessor tests, and was wondering why exceptions weren't bubbling up while calling checkFailed on my RpcController.

      Turns out, that HMaster's execMasterService seems to be sending the wrong RpcController (that happens to be null in my case) to the methods.

      I have a fix that appears to work, but I am not familiar enough with the code to know that it's the write one.

      Version I am working on has the git sha 9a322b0

        Activity

        Hide
        stack added a comment -

        Marking closed.

        Show
        stack added a comment - Marking closed.
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK #3818 (See https://builds.apache.org/job/HBase-TRUNK/3818/)
        HBASE-7688. Master coprocessor RPCs don't propagate exceptions (Mike Lewis) (Revision 1439692)

        Result = FAILURE
        apurtell :
        Files :

        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
        • /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK #3818 (See https://builds.apache.org/job/HBase-TRUNK/3818/ ) HBASE-7688 . Master coprocessor RPCs don't propagate exceptions (Mike Lewis) (Revision 1439692) Result = FAILURE apurtell : Files : /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java
        Hide
        Hudson added a comment -

        Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #381 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/381/)
        HBASE-7688. Master coprocessor RPCs don't propagate exceptions (Mike Lewis) (Revision 1439692)

        Result = FAILURE
        apurtell :
        Files :

        • /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
        • /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java
        Show
        Hudson added a comment - Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #381 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/381/ ) HBASE-7688 . Master coprocessor RPCs don't propagate exceptions (Mike Lewis) (Revision 1439692) Result = FAILURE apurtell : Files : /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java
        Hide
        Andrew Purtell added a comment -

        Committed to trunk. Coprocessor and security tests pass locally, including new unit test. Thanks for the patch Mike.

        Show
        Andrew Purtell added a comment - Committed to trunk. Coprocessor and security tests pass locally, including new unit test. Thanks for the patch Mike.
        Hide
        Andrew Purtell added a comment -

        Thanks Gary. Running tests locally, will commit shortly if they are good.

        Show
        Andrew Purtell added a comment - Thanks Gary. Running tests locally, will commit shortly if they are good.
        Hide
        Gary Helmling added a comment -

        +1 on patch as well.

        Show
        Gary Helmling added a comment - +1 on patch as well.
        Hide
        Andrew Purtell added a comment -

        Nice. Going to commit. Thanks for the reviews Ted.

        Show
        Andrew Purtell added a comment - Nice. Going to commit. Thanks for the reviews Ted.
        Hide
        Ted Yu added a comment -

        +1 on patch.

        Show
        Ted Yu added a comment - +1 on patch.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12566704/fix-hmaster-rpc-exceptions-2.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 lineLengths. The patch does not introduce lines longer than 100

        +1 core tests. The patch passed unit tests in .

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12566704/fix-hmaster-rpc-exceptions-2.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 3 new or modified tests. +1 hadoop2.0 . The patch compiles against the hadoop 2.0 profile. +1 javadoc . The javadoc tool did not generate any warning messages. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 lineLengths . The patch does not introduce lines longer than 100 +1 core tests . The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/4212//console This message is automatically generated.
        Hide
        Mike Lewis added a comment -

        Same patch with test case for Master that fails before the fix, and works after. Also added a test that shows that region RPC error stuff works correctly currently.

        Show
        Mike Lewis added a comment - Same patch with test case for Master that fails before the fix, and works after. Also added a test that shows that region RPC error stuff works correctly currently.
        Hide
        Ted Yu added a comment -
          public ClientProtos.CoprocessorServiceResponse execMasterService(final RpcController controller,
              final ClientProtos.CoprocessorServiceRequest request) throws ServiceException {
            try {
              ServerRpcController execController = new ServerRpcController();
        

        If controller is an instance of ServerRpcController, do we need to create a new instance ?

        Show
        Ted Yu added a comment - public ClientProtos.CoprocessorServiceResponse execMasterService( final RpcController controller, final ClientProtos.CoprocessorServiceRequest request) throws ServiceException { try { ServerRpcController execController = new ServerRpcController(); If controller is an instance of ServerRpcController, do we need to create a new instance ?
        Hide
        Ted Yu added a comment -

        Interesting.

        Are you able to add a unit test that shows the exception being propagated ?

        Thanks

        Show
        Ted Yu added a comment - Interesting. Are you able to add a unit test that shows the exception being propagated ? Thanks
        Hide
        Mike Lewis added a comment -

        Potential fix

        Show
        Mike Lewis added a comment - Potential fix

          People

          • Assignee:
            Mike Lewis
            Reporter:
            Mike Lewis
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development