Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2694

Removal of Avro broke non-PB NN services

    Details

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

      Description

      RpcEngine implementations have to register themselves associated with an RpcKind. Both WritableRpcEngine and ProtobufRpcEngine do this registration in static initialization blocks. It used to be that the static initializer block for WritableRpcEngine was triggered when AvroRpcEngine was initialized, since this instantiated a WritableRpcEngine object. With AvroRpcEngine gone, there's nothing in the NN to trigger the WritableRpcEngine static initialization block. Therefore, those RPC services which still use Writable and not PB no longer work.

      For example, if I try to run `hdfs groups' on trunk, which uses the GetUserMappingsProtocol, this error gets spit out:

      $ hdfs groups
      log4j:ERROR Could not find value for key log4j.appender.NullAppender
      log4j:ERROR Could not instantiate appender named "NullAppender".
      Exception in thread "main" java.io.IOException: Unknown rpc kind RPC_WRITABLE
      	at org.apache.hadoop.ipc.Client.call(Client.java:1136)
      	at org.apache.hadoop.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:205)
      	at $Proxy6.getGroupsForUser(Unknown Source)
      	at org.apache.hadoop.tools.GetGroupsBase.run(GetGroupsBase.java:71)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:69)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:83)
      	at org.apache.hadoop.hdfs.tools.GetGroups.main(GetGroups.java:56)
      
      1. HDFS-2694.patch
        1 kB
        Aaron T. Myers
      2. HDFS-2694.txt
        5 kB
        Suresh Srinivas
      3. HDFS-2694.txt
        5 kB
        Suresh Srinivas

        Issue Links

          Activity

          Hide
          Aaron T. Myers added a comment -

          TestGetGroups isn't failing because the client side (run in the same JVM) ends up correctly initializing WritableRpcEngine, which causes it to be registered on the server side as well.

          Show
          Aaron T. Myers added a comment - TestGetGroups isn't failing because the client side (run in the same JVM) ends up correctly initializing WritableRpcEngine, which causes it to be registered on the server side as well.
          Hide
          Aaron T. Myers added a comment -

          Here's a patch which addresses the issue. Note that this depends upon the patch posted on HADOOP-7931.

          Show
          Aaron T. Myers added a comment - Here's a patch which addresses the issue. Note that this depends upon the patch posted on HADOOP-7931 .
          Hide
          Aaron T. Myers added a comment -

          Not marking this patch available since Jenkins will fail to build without HADOOP-7931. See my comment on that JIRA for what testing I did.

          Show
          Aaron T. Myers added a comment - Not marking this patch available since Jenkins will fail to build without HADOOP-7931 . See my comment on that JIRA for what testing I did.
          Hide
          Suresh Srinivas added a comment -

          Aaron, this patch should fix it without any need for change in common.

          Show
          Suresh Srinivas added a comment - Aaron, this patch should fix it without any need for change in common.
          Hide
          Suresh Srinivas added a comment -

          Patch generated from the right root dir.

          Show
          Suresh Srinivas added a comment - Patch generated from the right root dir.
          Hide
          Aaron T. Myers added a comment -

          Hey Suresh, the patch you provided does not fix the issue. The static initialization of WritableRpcEngine is still not running, and so org.apache.hadoop.ipc.Server.registerProtocolEngine is never getting called for writable. I just tested this by applying your patch, recompiling, running an NN, and trying to run `hdfs groups'.

          Show
          Aaron T. Myers added a comment - Hey Suresh, the patch you provided does not fix the issue. The static initialization of WritableRpcEngine is still not running, and so org.apache.hadoop.ipc.Server.registerProtocolEngine is never getting called for writable. I just tested this by applying your patch, recompiling, running an NN, and trying to run `hdfs groups'.
          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/)
          HDFS-2694. Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers.

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1519 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1519/ ) HDFS-2694 . Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers. atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215364 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #1446 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1446/)
          HDFS-2694. Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers.

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1446 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1446/ ) HDFS-2694 . Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers. atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215364 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #1470 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1470/)
          HDFS-2694. Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers.

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1470 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1470/ ) HDFS-2694 . Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers. atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215364 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #897 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/897/)
          HDFS-2694. Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers.

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #897 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/897/ ) HDFS-2694 . Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers. atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215364 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk #930 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/930/)
          HDFS-2694. Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers.

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

          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #930 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/930/ ) HDFS-2694 . Removal of Avro broke non-PB NN services. Contributed by Aaron T. Myers. atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1215364 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.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