Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9478

Reason for failing ipc.FairCallQueue contruction should be thrown

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 2.7.3, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When FairCallQueue Construction fails, NN fails to start throwing RunTimeException without throwing any reason on why it fails.

      2015-11-30 17:45:26,661 INFO org.apache.hadoop.ipc.FairCallQueue: FairCallQueue is in use with 4 queues.
      2015-11-30 17:45:26,665 DEBUG org.apache.hadoop.metrics2.util.MBeans: Registered Hadoop:service=ipc.65110,name=DecayRpcScheduler
      2015-11-30 17:45:26,666 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: Failed to start namenode.
      java.lang.RuntimeException: org.apache.hadoop.ipc.FairCallQueue could not be constructed.
      at org.apache.hadoop.ipc.CallQueueManager.createCallQueueInstance(CallQueueManager.java:96)
      at org.apache.hadoop.ipc.CallQueueManager.<init>(CallQueueManager.java:55)
      at org.apache.hadoop.ipc.Server.<init>(Server.java:2241)
      at org.apache.hadoop.ipc.RPC$Server.<init>(RPC.java:942)
      at org.apache.hadoop.ipc.ProtobufRpcEngine$Server.<init>(ProtobufRpcEngine.java:534)
      at org.apache.hadoop.ipc.ProtobufRpcEngine.getServer(ProtobufRpcEngine.java:509)
      at org.apache.hadoop.ipc.RPC$Builder.build(RPC.java:784)
      at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.<init>(NameNodeRpcServer.java:346)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.createRpcServer(NameNode.java:750)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:687)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:889)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:872)

      Example: reason for above failure could have been –
      1. the weights were not equal to the number of queues configured.
      2. decay-scheduler.thresholds not in sync with number of queues.

      1. HDFS-9478.patch
        2 kB
        Ajith S
      2. HDFS-9478.2.patch
        3 kB
        Ajith S
      3. HDFS-9478.3.patch
        3 kB
        Ajith S

        Activity

        Hide
        vinodkv Vinod Kumar Vavilapalli added a comment -

        Closing the JIRA as part of 2.7.3 release.

        Show
        vinodkv Vinod Kumar Vavilapalli added a comment - Closing the JIRA as part of 2.7.3 release.
        Hide
        ajithshetty Ajith S added a comment -
        Show
        ajithshetty Ajith S added a comment - Thanks Arpit Agarwal
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #9521 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9521/)
        HDFS-9478. Reason for failing ipc.FairCallQueue contruction should be (arp: rev 46a5245db95f2aad199100d2886381398070124f)

        • hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallQueueManager.java
        • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestCallQueueManager.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9521 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9521/ ) HDFS-9478 . Reason for failing ipc.FairCallQueue contruction should be (arp: rev 46a5245db95f2aad199100d2886381398070124f) hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallQueueManager.java hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestCallQueueManager.java
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        I've committed this to trunk through branch-2.7. Thanks for the contribution Ajith S and thanks for reporting this Archana T.

        Show
        arpitagarwal Arpit Agarwal added a comment - I've committed this to trunk through branch-2.7. Thanks for the contribution Ajith S and thanks for reporting this Archana T .
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 15s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 11m 23s trunk passed
        +1 compile 15m 40s trunk passed with JDK v1.8.0_74
        +1 compile 11m 50s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 35s trunk passed
        +1 mvnsite 1m 33s trunk passed
        +1 mvneclipse 0m 23s trunk passed
        +1 findbugs 2m 27s trunk passed
        +1 javadoc 1m 42s trunk passed with JDK v1.8.0_74
        +1 javadoc 1m 41s trunk passed with JDK v1.7.0_95
        +1 mvninstall 1m 6s the patch passed
        +1 compile 15m 27s the patch passed with JDK v1.8.0_74
        +1 javac 15m 27s the patch passed
        +1 compile 12m 10s the patch passed with JDK v1.7.0_95
        +1 javac 12m 10s the patch passed
        +1 checkstyle 0m 35s the patch passed
        +1 mvnsite 1m 33s the patch passed
        +1 mvneclipse 0m 24s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 2m 51s the patch passed
        +1 javadoc 1m 47s the patch passed with JDK v1.8.0_74
        +1 javadoc 1m 51s the patch passed with JDK v1.7.0_95
        -1 unit 13m 35s hadoop-common in the patch failed with JDK v1.8.0_74.
        -1 unit 12m 1s hadoop-common in the patch failed with JDK v1.7.0_95.
        -1 asflicense 0m 38s Patch generated 3 ASF License warnings.
        113m 33s



        Reason Tests
        JDK v1.8.0_74 Failed junit tests hadoop.ipc.TestRPCWaitForProxy
          hadoop.fs.shell.find.TestIname
          hadoop.fs.shell.find.TestPrint0
          hadoop.ipc.TestIPC
          hadoop.fs.shell.find.TestPrint
          hadoop.fs.shell.find.TestName
        JDK v1.8.0_74 Timed out junit tests org.apache.hadoop.util.TestNativeLibraryChecker
        JDK v1.7.0_95 Failed junit tests hadoop.fs.shell.find.TestIname
          hadoop.fs.shell.find.TestPrint0
          hadoop.fs.shell.find.TestName
        JDK v1.7.0_95 Timed out junit tests org.apache.hadoop.util.TestNativeLibraryChecker



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:fbe3e86
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12795758/HDFS-9478.3.patch
        JIRA Issue HDFS-9478
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 3054b1086596 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 1f004b3
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_74.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt
        unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14974/testReport/
        asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-asflicense-problems.txt
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14974/console
        Powered by Apache Yetus 0.2.0 http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 11m 23s trunk passed +1 compile 15m 40s trunk passed with JDK v1.8.0_74 +1 compile 11m 50s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 35s trunk passed +1 mvnsite 1m 33s trunk passed +1 mvneclipse 0m 23s trunk passed +1 findbugs 2m 27s trunk passed +1 javadoc 1m 42s trunk passed with JDK v1.8.0_74 +1 javadoc 1m 41s trunk passed with JDK v1.7.0_95 +1 mvninstall 1m 6s the patch passed +1 compile 15m 27s the patch passed with JDK v1.8.0_74 +1 javac 15m 27s the patch passed +1 compile 12m 10s the patch passed with JDK v1.7.0_95 +1 javac 12m 10s the patch passed +1 checkstyle 0m 35s the patch passed +1 mvnsite 1m 33s the patch passed +1 mvneclipse 0m 24s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 51s the patch passed +1 javadoc 1m 47s the patch passed with JDK v1.8.0_74 +1 javadoc 1m 51s the patch passed with JDK v1.7.0_95 -1 unit 13m 35s hadoop-common in the patch failed with JDK v1.8.0_74. -1 unit 12m 1s hadoop-common in the patch failed with JDK v1.7.0_95. -1 asflicense 0m 38s Patch generated 3 ASF License warnings. 113m 33s Reason Tests JDK v1.8.0_74 Failed junit tests hadoop.ipc.TestRPCWaitForProxy   hadoop.fs.shell.find.TestIname   hadoop.fs.shell.find.TestPrint0   hadoop.ipc.TestIPC   hadoop.fs.shell.find.TestPrint   hadoop.fs.shell.find.TestName JDK v1.8.0_74 Timed out junit tests org.apache.hadoop.util.TestNativeLibraryChecker JDK v1.7.0_95 Failed junit tests hadoop.fs.shell.find.TestIname   hadoop.fs.shell.find.TestPrint0   hadoop.fs.shell.find.TestName JDK v1.7.0_95 Timed out junit tests org.apache.hadoop.util.TestNativeLibraryChecker Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12795758/HDFS-9478.3.patch JIRA Issue HDFS-9478 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 3054b1086596 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 1f004b3 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_74.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14974/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/14974/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14974/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        +1 pending Jenkins.

        Show
        arpitagarwal Arpit Agarwal added a comment - +1 pending Jenkins.
        Hide
        ajithshetty Ajith S added a comment -

        Thanks for the input, i have updated the patch as per review comment.

        Show
        ajithshetty Ajith S added a comment - Thanks for the input, i have updated the patch as per review comment.
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        Thanks for updating the patch Ajith S. Nitpick for the test case - you can use Assert.fail instead of assertTrue(false). +1 otherwise.

        I tried this out with FairCallQueue and bad parameters and verified that the original exception is logged.

        Show
        arpitagarwal Arpit Agarwal added a comment - Thanks for updating the patch Ajith S . Nitpick for the test case - you can use Assert.fail instead of assertTrue(false). +1 otherwise. I tried this out with FairCallQueue and bad parameters and verified that the original exception is logged.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 21s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 8m 13s trunk passed
        +1 compile 7m 15s trunk passed with JDK v1.8.0_74
        +1 compile 6m 38s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 21s trunk passed
        +1 mvnsite 0m 56s trunk passed
        +1 mvneclipse 0m 14s trunk passed
        +1 findbugs 1m 34s trunk passed
        +1 javadoc 0m 51s trunk passed with JDK v1.8.0_74
        +1 javadoc 1m 3s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 41s the patch passed
        +1 compile 5m 50s the patch passed with JDK v1.8.0_74
        +1 javac 5m 50s the patch passed
        +1 compile 6m 44s the patch passed with JDK v1.7.0_95
        +1 javac 6m 44s the patch passed
        +1 checkstyle 0m 20s the patch passed
        +1 mvnsite 0m 56s the patch passed
        +1 mvneclipse 0m 13s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 49s the patch passed
        +1 javadoc 0m 51s the patch passed with JDK v1.8.0_74
        +1 javadoc 1m 4s the patch passed with JDK v1.7.0_95
        -1 unit 6m 30s hadoop-common in the patch failed with JDK v1.8.0_74.
        -1 unit 6m 50s hadoop-common in the patch failed with JDK v1.7.0_95.
        -1 asflicense 0m 24s Patch generated 3 ASF License warnings.
        60m 49s



        Reason Tests
        JDK v1.8.0_74 Timed out junit tests org.apache.hadoop.util.TestNativeLibraryChecker
        JDK v1.7.0_95 Timed out junit tests org.apache.hadoop.util.TestNativeLibraryChecker



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:fbe3e86
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12795599/HDFS-9478.2.patch
        JIRA Issue HDFS-9478
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux c7a18d3af01b 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / d8383c6
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_74.txt
        unit https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt
        unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14955/testReport/
        asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-asflicense-problems.txt
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14955/console
        Powered by Apache Yetus 0.2.0 http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 21s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 8m 13s trunk passed +1 compile 7m 15s trunk passed with JDK v1.8.0_74 +1 compile 6m 38s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 21s trunk passed +1 mvnsite 0m 56s trunk passed +1 mvneclipse 0m 14s trunk passed +1 findbugs 1m 34s trunk passed +1 javadoc 0m 51s trunk passed with JDK v1.8.0_74 +1 javadoc 1m 3s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 41s the patch passed +1 compile 5m 50s the patch passed with JDK v1.8.0_74 +1 javac 5m 50s the patch passed +1 compile 6m 44s the patch passed with JDK v1.7.0_95 +1 javac 6m 44s the patch passed +1 checkstyle 0m 20s the patch passed +1 mvnsite 0m 56s the patch passed +1 mvneclipse 0m 13s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 49s the patch passed +1 javadoc 0m 51s the patch passed with JDK v1.8.0_74 +1 javadoc 1m 4s the patch passed with JDK v1.7.0_95 -1 unit 6m 30s hadoop-common in the patch failed with JDK v1.8.0_74. -1 unit 6m 50s hadoop-common in the patch failed with JDK v1.7.0_95. -1 asflicense 0m 24s Patch generated 3 ASF License warnings. 60m 49s Reason Tests JDK v1.8.0_74 Timed out junit tests org.apache.hadoop.util.TestNativeLibraryChecker JDK v1.7.0_95 Timed out junit tests org.apache.hadoop.util.TestNativeLibraryChecker Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12795599/HDFS-9478.2.patch JIRA Issue HDFS-9478 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux c7a18d3af01b 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / d8383c6 Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_74.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-unit-hadoop-common-project_hadoop-common-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14955/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/14955/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14955/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
        Hide
        ajithshetty Ajith S added a comment -

        e.getCause() is a Throwable and would need method signature change (adding throws to all methods in above stacktrace) , i feel its better to wrap the e.getCause() in RuntimeException(Unchecked exception) instead.

        Show
        ajithshetty Ajith S added a comment - e.getCause() is a Throwable and would need method signature change (adding throws to all methods in above stacktrace) , i feel its better to wrap the e.getCause() in RuntimeException(Unchecked exception) instead.
        Hide
        ajithshetty Ajith S added a comment -

        Modified as per comments. Please review

        Show
        ajithshetty Ajith S added a comment - Modified as per comments. Please review
        Hide
        arpitagarwal Arpit Agarwal added a comment - - edited

        Sounds good. One comment - the catch (InvocationTargetException e) block should re-throw e.getCause().

        It may be simple to add a test case where you enable a CallQueue implementation whose constructor throws and check you get back the same exception.

        Show
        arpitagarwal Arpit Agarwal added a comment - - edited Sounds good. One comment - the catch (InvocationTargetException e) block should re-throw e.getCause() . It may be simple to add a test case where you enable a CallQueue implementation whose constructor throws and check you get back the same exception.
        Hide
        ajithshetty Ajith S added a comment -
        .....
        catch (RuntimeException e) {
           throw e;
        } catch (InvocationTargetException e) {
           throw new RuntimeException(theClass.getName() +
                 " could not be constructed.",e);
        } catch (Exception e) {
        //empty
        }
        

        I am planning to replace the catch blocks with above set of catch blocks in org.apache.hadoop.ipc.CallQueueManager.createCallQueueInstance
        I have a few concerns here
        1. I expect FairCallQueue to log the exception cause instead of depending on createCallQueueInstance
        2. Catching InvocationTargetException changes the code flow here, (in a scenario where the CallQueue object may have been created using the default constructor)

        Show
        ajithshetty Ajith S added a comment - ..... catch (RuntimeException e) { throw e; } catch (InvocationTargetException e) { throw new RuntimeException(theClass.getName() + " could not be constructed." ,e); } catch (Exception e) { //empty } I am planning to replace the catch blocks with above set of catch blocks in org.apache.hadoop.ipc.CallQueueManager.createCallQueueInstance I have a few concerns here 1. I expect FairCallQueue to log the exception cause instead of depending on createCallQueueInstance 2. Catching InvocationTargetException changes the code flow here, (in a scenario where the CallQueue object may have been created using the default constructor)
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        guess we better refactor org.apache.hadoop.ipc.CallQueueManager.createCallQueueInstance and check for InvocationTargetException

        Thanks Ajith S. Yes that sounds right. That would be a more general solution to this problem. Also cc Chris Li.

        Show
        arpitagarwal Arpit Agarwal added a comment - guess we better refactor org.apache.hadoop.ipc.CallQueueManager.createCallQueueInstance and check for InvocationTargetException Thanks Ajith S . Yes that sounds right. That would be a more general solution to this problem. Also cc Chris Li .
        Hide
        ajithshetty Ajith S added a comment -

        guess we better refactor org.apache.hadoop.ipc.CallQueueManager.createCallQueueInstance and check for InvocationTargetException
        any thoughts.?

        Show
        ajithshetty Ajith S added a comment - guess we better refactor org.apache.hadoop.ipc.CallQueueManager.createCallQueueInstance and check for InvocationTargetException any thoughts.?
        Hide
        ajithshetty Ajith S added a comment -

        I think the RuntimeException thrown by FairCallQueue is wrapped as InvocationTargetException, so RuntimeException catch block will be bypassed and instead caught by following Exception catch block
        Reference : http://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Constructor.html#newInstance-java.lang.Object...-
        InvocationTargetException - if the underlying constructor throws an exception.

        Show
        ajithshetty Ajith S added a comment - I think the RuntimeException thrown by FairCallQueue is wrapped as InvocationTargetException , so RuntimeException catch block will be bypassed and instead caught by following Exception catch block Reference : http://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Constructor.html#newInstance-java.lang.Object...- InvocationTargetException - if the underlying constructor throws an exception.
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        It is odd that the RuntimeException thrown by the FairCallQueue constructor is not caught and re-thrown by CreateCallQueueInstance.

          private <T extends BlockingQueue<E>> T createCallQueueInstance(
              Class<T> theClass, int maxLen, String ns, Configuration conf) {
        
            // Used for custom, configurable callqueues
            try {
              Constructor<T> ctor = theClass.getDeclaredConstructor(int.class, String.class,
                Configuration.class);
              return ctor.newInstance(maxLen, ns, conf);
            } catch (RuntimeException e) {
              throw e;
        ...
        
        Show
        arpitagarwal Arpit Agarwal added a comment - It is odd that the RuntimeException thrown by the FairCallQueue constructor is not caught and re-thrown by CreateCallQueueInstance . private <T extends BlockingQueue<E>> T createCallQueueInstance( Class <T> theClass, int maxLen, String ns, Configuration conf) { // Used for custom, configurable callqueues try { Constructor<T> ctor = theClass.getDeclaredConstructor( int .class, String .class, Configuration.class); return ctor.newInstance(maxLen, ns, conf); } catch (RuntimeException e) { throw e; ...
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 15s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s 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 mvninstall 7m 22s trunk passed
        +1 compile 8m 30s trunk passed with JDK v1.8.0_72
        +1 compile 7m 45s trunk passed with JDK v1.7.0_95
        +1 checkstyle 0m 21s trunk passed
        +1 mvnsite 1m 4s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 1m 36s trunk passed
        +1 javadoc 1m 5s trunk passed with JDK v1.8.0_72
        +1 javadoc 1m 7s trunk passed with JDK v1.7.0_95
        +1 mvninstall 0m 46s the patch passed
        +1 compile 8m 35s the patch passed with JDK v1.8.0_72
        +1 javac 8m 35s the patch passed
        +1 compile 7m 53s the patch passed with JDK v1.7.0_95
        +1 javac 7m 53s the patch passed
        -1 checkstyle 0m 22s hadoop-common-project/hadoop-common: patch generated 1 new + 4 unchanged - 0 fixed = 5 total (was 4)
        +1 mvnsite 1m 9s the patch passed
        +1 mvneclipse 0m 14s the patch passed
        +1 whitespace 0m 0s Patch has no whitespace issues.
        +1 findbugs 1m 56s the patch passed
        +1 javadoc 1m 7s the patch passed with JDK v1.8.0_72
        +1 javadoc 1m 11s the patch passed with JDK v1.7.0_95
        +1 unit 10m 13s hadoop-common in the patch passed with JDK v1.8.0_72.
        +1 unit 9m 46s hadoop-common in the patch passed with JDK v1.7.0_95.
        +1 asflicense 0m 24s Patch does not generate ASF License warnings.
        74m 14s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:0ca8df7
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12790389/HDFS-9478.patch
        JIRA Issue HDFS-9478
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 51d9aed6c8de 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 321a80c
        Default Java 1.7.0_95
        Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_72 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/14645/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt
        JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14645/testReport/
        modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14645/console
        Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s 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 mvninstall 7m 22s trunk passed +1 compile 8m 30s trunk passed with JDK v1.8.0_72 +1 compile 7m 45s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 21s trunk passed +1 mvnsite 1m 4s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 1m 36s trunk passed +1 javadoc 1m 5s trunk passed with JDK v1.8.0_72 +1 javadoc 1m 7s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 46s the patch passed +1 compile 8m 35s the patch passed with JDK v1.8.0_72 +1 javac 8m 35s the patch passed +1 compile 7m 53s the patch passed with JDK v1.7.0_95 +1 javac 7m 53s the patch passed -1 checkstyle 0m 22s hadoop-common-project/hadoop-common: patch generated 1 new + 4 unchanged - 0 fixed = 5 total (was 4) +1 mvnsite 1m 9s the patch passed +1 mvneclipse 0m 14s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 56s the patch passed +1 javadoc 1m 7s the patch passed with JDK v1.8.0_72 +1 javadoc 1m 11s the patch passed with JDK v1.7.0_95 +1 unit 10m 13s hadoop-common in the patch passed with JDK v1.8.0_72. +1 unit 9m 46s hadoop-common in the patch passed with JDK v1.7.0_95. +1 asflicense 0m 24s Patch does not generate ASF License warnings. 74m 14s Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12790389/HDFS-9478.patch JIRA Issue HDFS-9478 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 51d9aed6c8de 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 321a80c Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_72 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/14645/artifact/patchprocess/diff-checkstyle-hadoop-common-project_hadoop-common.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/14645/testReport/ modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common Console output https://builds.apache.org/job/PreCommit-HDFS-Build/14645/console Powered by Apache Yetus 0.2.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        ajithshetty Ajith S added a comment -

        Please review

        Show
        ajithshetty Ajith S added a comment - Please review
        Hide
        arpitagarwal Arpit Agarwal added a comment -

        Hi Ajith S, would you like to provide a patch for this?

        Show
        arpitagarwal Arpit Agarwal added a comment - Hi Ajith S , would you like to provide a patch for this?

          People

          • Assignee:
            ajithshetty Ajith S
            Reporter:
            archanat Archana T
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development