Hadoop Common
  1. Hadoop Common
  2. HADOOP-7174

null is displayed in the console,if the src path is invalid while doing copyToLocal operation from commandLine

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.1, 0.22.0, 0.23.0
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      When we perform copyToLocal operations from commandLine and if src Path is invalid

      srcFS.globStatus(srcpath) will return null. So, when we find the length of resulted value, it will throw NullPointerException.

      Since we are handling generic exception , it will display null as the message.

      1. HADOOP-7174.patch
        2 kB
        Uma Maheswara Rao G
      2. HADOOP-7174.1.patch
        3 kB
        Uma Maheswara Rao G

        Issue Links

          Activity

          Hide
          Daryn Sharp added a comment -

          Looks good. Two comments:
          1) I'd suggest throwing a more posix error string like srcPath + ": No such file or directory"
          2) Should test the exit code of shell.run() to ensure it's non-zero upon failure. If it happens to return 0, and it's a non-trivial fix, I'm universally addressing it via HADOOP-7176.

          Show
          Daryn Sharp added a comment - Looks good. Two comments: 1) I'd suggest throwing a more posix error string like srcPath + ": No such file or directory" 2) Should test the exit code of shell.run() to ensure it's non-zero upon failure. If it happens to return 0, and it's a non-trivial fix, I'm universally addressing it via HADOOP-7176 .
          Hide
          Daryn Sharp added a comment -

          +1

          Show
          Daryn Sharp added a comment - +1
          Hide
          Hadoop QA added a comment -

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

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

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

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

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

          +1 system test framework. The patch passed system test framework compile.

          Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/318//testReport/
          Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/318//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/318//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/12474506/HADOOP-7174.1.patch against trunk revision 1084769. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 4 new or modified tests. +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 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/318//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/318//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/318//console This message is automatically generated.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          I have committed this. Thanks, Uma!

          Also, thanks Daryn for reviewing it.

          Show
          Tsz Wo Nicholas Sze added a comment - I have committed this. Thanks, Uma! Also, thanks Daryn for reviewing it.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk-Commit #534 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/534/)
          HADOOP-7174. Null is displayed in the "fs -copyToLocal" command. Contributed by Uma Maheswara Rao G

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #534 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk-Commit/534/ ) HADOOP-7174 . Null is displayed in the "fs -copyToLocal" command. Contributed by Uma Maheswara Rao G
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-22-branch #36 (See https://hudson.apache.org/hudson/job/Hadoop-Common-22-branch/36/)
          HADOOP-7174. Null is displayed in the "fs -copyToLocal" command. Contributed by Uma Maheswara Rao G

          Show
          Hudson added a comment - Integrated in Hadoop-Common-22-branch #36 (See https://hudson.apache.org/hudson/job/Hadoop-Common-22-branch/36/ ) HADOOP-7174 . Null is displayed in the "fs -copyToLocal" command. Contributed by Uma Maheswara Rao G
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #641 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/641/)
          HADOOP-7174. Null is displayed in the "fs -copyToLocal" command. Contributed by Uma Maheswara Rao G

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #641 (See https://hudson.apache.org/hudson/job/Hadoop-Common-trunk/641/ ) HADOOP-7174 . Null is displayed in the "fs -copyToLocal" command. Contributed by Uma Maheswara Rao G
          Hide
          Tsz Wo Nicholas Sze added a comment -

          Hi Uma, some tests in HDFS failed after this; see HDFS-1786. Could you fix them as well?

          Show
          Tsz Wo Nicholas Sze added a comment - Hi Uma, some tests in HDFS failed after this; see HDFS-1786 . Could you fix them as well?
          Hide
          Uma Maheswara Rao G added a comment -

          Thanks Nicholas, i addressed this.
          I prepared the patch , will upload it in HDFS.

          Show
          Uma Maheswara Rao G added a comment - Thanks Nicholas, i addressed this. I prepared the patch , will upload it in HDFS.
          Hide
          Todd Lipcon added a comment -

          This wasn't committed to branch-21 – removing 0.21 fixversion.

          Show
          Todd Lipcon added a comment - This wasn't committed to branch-21 – removing 0.21 fixversion.
          Hide
          Tsz Wo Nicholas Sze added a comment -

          > This wasn't committed to branch-21 - removing 0.21 fixversion.

          I have double checked. This was indeed committed to 0.21. See also this comment.

          Show
          Tsz Wo Nicholas Sze added a comment - > This wasn't committed to branch-21 - removing 0.21 fixversion. I have double checked. This was indeed committed to 0.21. See also this comment .

            People

            • Assignee:
              Uma Maheswara Rao G
              Reporter:
              Uma Maheswara Rao G
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development