Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0-alpha1
    • Component/s: None
    • Labels:
    • Hadoop Flags:
      Reviewed

      Description

      It might be a nice enhancement to print the contents of the java command line to the out file during daemon startup to help with debugging.

        Activity

        Hide
        aw Allen Wittenauer added a comment - - edited

        Since this was filed, the --debug option has been added which effectively does this feature:

        function hadoop_java_exec
        {
          # run a java command.  this is used for
          # non-daemons
        
          local command=$1
          local class=$2
          shift 2
        
          hadoop_debug "Final CLASSPATH: ${CLASSPATH}"
          hadoop_debug "Final HADOOP_OPTS: ${HADOOP_OPTS}"
        
          export CLASSPATH
          #shellcheck disable=SC2086
          exec "${JAVA}" "-Dproc_${command}" ${HADOOP_OPTS} "${class}" "$@"
        }
        

        ... and similar code in the *_daemon equivalents.

        At the time, I opted not to put the entire java command line because:

        • The entire command line is exceedingly long. It pretty much requires breaking it up for readability.
        • The CLASSPATH and HADOOP_OPTS are significantly more interesting than the class and arguments 99% of the time

        So that leaves a few things that should probably added to the --debug output for this JIRA:

        • JAVA_HOME and/or JAVA
        • command line options
        • class name
        Show
        aw Allen Wittenauer added a comment - - edited Since this was filed, the --debug option has been added which effectively does this feature: function hadoop_java_exec { # run a java command. this is used for # non-daemons local command=$1 local class=$2 shift 2 hadoop_debug "Final CLASSPATH: ${CLASSPATH}" hadoop_debug "Final HADOOP_OPTS: ${HADOOP_OPTS}" export CLASSPATH #shellcheck disable=SC2086 exec "${JAVA}" "-Dproc_${command}" ${HADOOP_OPTS} "${class}" "$@" } ... and similar code in the *_daemon equivalents. At the time, I opted not to put the entire java command line because: The entire command line is exceedingly long. It pretty much requires breaking it up for readability. The CLASSPATH and HADOOP_OPTS are significantly more interesting than the class and arguments 99% of the time So that leaves a few things that should probably added to the --debug output for this JIRA: JAVA_HOME and/or JAVA command line options class name
        Hide
        sekikn Kengo Seki added a comment -

        Attaching a patch.

        Show
        sekikn Kengo Seki added a comment - Attaching a patch.
        Hide
        hadoopqa Hadoop QA added a comment -



        +1 overall



        Vote Subsystem Runtime Comment
        0 pre-patch 0m 0s Pre-patch trunk compilation is healthy.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 release audit 0m 15s The applied patch does not increase the total number of release audit warnings.
        0 shellcheck 0m 15s Shellcheck was not available.
        +1 whitespace 0m 0s The patch has no lines that end in whitespace.
            0m 19s  



        Subsystem Report/Notes
        Patch URL http://issues.apache.org/jira/secure/attachment/12730027/HADOOP-10993.001.patch
        Optional Tests shellcheck
        git revision trunk / a319771
        Java 1.7.0_55
        uname Linux asf902.gq1.ygridcore.net 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
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6467/console

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 0m 0s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 release audit 0m 15s The applied patch does not increase the total number of release audit warnings. 0 shellcheck 0m 15s Shellcheck was not available. +1 whitespace 0m 0s The patch has no lines that end in whitespace.     0m 19s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12730027/HADOOP-10993.001.patch Optional Tests shellcheck git revision trunk / a319771 Java 1.7.0_55 uname Linux asf902.gq1.ygridcore.net 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 Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6467/console This message was automatically generated.
        Hide
        vinayrpet Vinayakumar B added a comment -

        +1,
        committed to trunk.

        Show
        vinayrpet Vinayakumar B added a comment - +1, committed to trunk.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #7830 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7830/)
        HADOOP-10993. Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0)

        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7830 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7830/ ) HADOOP-10993 . Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0) hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #927 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/927/)
        HADOOP-10993. Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #927 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/927/ ) HADOOP-10993 . Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #196 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/196/)
        HADOOP-10993. Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0)

        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #196 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/196/ ) HADOOP-10993 . Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0) hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #195 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/195/)
        HADOOP-10993. Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #195 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/195/ ) HADOOP-10993 . Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #2125 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2125/)
        HADOOP-10993. Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0)

        • hadoop-common-project/hadoop-common/CHANGES.txt
        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2125 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2125/ ) HADOOP-10993 . Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #185 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/185/)
        HADOOP-10993. Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0)

        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #185 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/185/ ) HADOOP-10993 . Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0) hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2143 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2143/)
        HADOOP-10993. Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0)

        • hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
        • hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk #2143 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2143/ ) HADOOP-10993 . Dump java command line to *.out file (Contributed by Kengo Seki) (vinayakumarb: rev ffbb574623c2a1dbcead201e9ae2dad3f77998d0) hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh hadoop-common-project/hadoop-common/CHANGES.txt

          People

          • Assignee:
            sekikn Kengo Seki
            Reporter:
            aw Allen Wittenauer
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development