Hadoop Common
  1. Hadoop Common
  2. HADOOP-7931

o.a.h.ipc.WritableRpcEngine should have a way to force initialization

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.24.0
    • Fix Version/s: 2.0.0-alpha
    • Component/s: ipc
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Target Version/s:

      Description

      WritableRpcEngine currently relies on a static initializer to register itself with o.a.h.ipc.Server as a valid RpcKind. There should be a way to ensure this initialization has already occurred.

      1. HADOOP-7931.patch
        2 kB
        Aaron T. Myers

        Issue Links

          Activity

          Hide
          Aaron T. Myers added a comment -

          Patch which addresses the issue.

          Show
          Aaron T. Myers added a comment - Patch which addresses the issue.
          Hide
          Aaron T. Myers added a comment -

          I tested this patch by applying this with the patch posted on HDFS-2694 and confirmed manually that the NN protocols which still use WritableRpcEngine work again with these patches.

          Show
          Aaron T. Myers added a comment - I tested this patch by applying this with the patch posted on HDFS-2694 and confirmed manually that the NN protocols which still use WritableRpcEngine work again with these patches.
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12507718/HADOOP-7931.patch
          against trunk revision .

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

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

          -1 javadoc. The javadoc tool appears to have generated 5 warning messages.

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

          +1 eclipse:eclipse. The patch built with eclipse:eclipse.

          +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 core tests. The patch passed unit tests in .

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/481//testReport/
          Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/481//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/12507718/HADOOP-7931.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 javadoc. The javadoc tool appears to have generated 5 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +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 core tests. The patch passed unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/481//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/481//console This message is automatically generated.
          Hide
          Suresh Srinivas added a comment -

          Aaron, why not just move the static initialization to ipc.Server. Then there is not need to make a call ensureInitialized() right?

          Show
          Suresh Srinivas added a comment - Aaron, why not just move the static initialization to ipc.Server. Then there is not need to make a call ensureInitialized() right?
          Hide
          Aaron T. Myers added a comment -

          Aaron, why not just move the static initialization to ipc.Server. Then there is not need to make a call ensureInitialized() right?

          Because presumably o.a.h.ipc.Server is supposed to be independent of underlying RpcEngine implementations, which is why there's a resgisterProtocolEngine method in the first place. If that's not in fact a design goal, then sure, adding the initialization to ipc.Server is fine.

          Show
          Aaron T. Myers added a comment - Aaron, why not just move the static initialization to ipc.Server. Then there is not need to make a call ensureInitialized() right? Because presumably o.a.h.ipc.Server is supposed to be independent of underlying RpcEngine implementations, which is why there's a resgisterProtocolEngine method in the first place. If that's not in fact a design goal, then sure, adding the initialization to ipc.Server is fine.
          Hide
          Suresh Srinivas added a comment -

          Ignore my previous comment - will take a look at this issue more closely.

          Show
          Suresh Srinivas added a comment - Ignore my previous comment - will take a look at this issue more closely.
          Hide
          Suresh Srinivas added a comment -

          +1 for your patch. I plan to cleanup this later. The way RpcEngines are initialized is not correct currently. Will clean it up later.

          Show
          Suresh Srinivas added a comment - +1 for your patch. I plan to cleanup this later. The way RpcEngines are initialized is not correct currently. Will clean it up later.
          Hide
          Aaron T. Myers added a comment -

          Thanks a lot for your quick review, Suresh. I've just committed this to trunk.

          Show
          Aaron T. Myers added a comment - Thanks a lot for your quick review, Suresh. I've just committed this to trunk.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk-Commit #1519 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1519/)
          HADOOP-7931. o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers

          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1519 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1519/ ) HADOOP-7931 . o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #1446 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1446/)
          HADOOP-7931. o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers

          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1446 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1446/ ) HADOOP-7931 . o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #1470 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1470/)
          HADOOP-7931. o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers

          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1470 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1470/ ) HADOOP-7931 . o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #897 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/897/)
          HADOOP-7931. o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers

          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #897 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/897/ ) HADOOP-7931 . o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #930 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/930/)
          HADOOP-7931. o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers

          atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358
          Files :

          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
          • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #930 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/930/ ) HADOOP-7931 . o.a.h.ipc.WritableRpcEngine should have a way to force initialization. Contributed by Aaron T. Myers atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215358 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/WritableRpcEngine.java
          Hide
          Tsz Wo Nicholas Sze added a comment -

          I have merged this to 0.23.

          Show
          Tsz Wo Nicholas Sze added a comment - I have merged this to 0.23.

            People

            • Assignee:
              Aaron T. Myers
              Reporter:
              Aaron T. Myers
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development