Hadoop Common
  1. Hadoop Common
  2. HADOOP-1593

FsShell should work with paths in non-default FileSystem

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.17.0
    • Component/s: fs
    • Labels:
      None
    • Release Note:
      Hide
      This bug allows non default path to specifeid in fsshell commands.

      So, you can now specify hadoop dfs -ls hdfs://remotehost1:port/path
        and hadoop dfs -ls hdfs://remotehost2:port/path without changing the config.
      Show
      This bug allows non default path to specifeid in fsshell commands. So, you can now specify hadoop dfs -ls hdfs://remotehost1:port/path   and hadoop dfs -ls hdfs://remotehost2:port/path without changing the config.

      Description

      If the default filesystem is, e.g., hdfs://foo:8888/, one should still be able to do 'bin/hadoop fs -ls hdfs://bar:9999/' or 'bin/hadoop fs -ls s3://cutting/foo'. Currently these generate a filesystem mismatch exception. This is because FsShell assumes that all paths are in the default FileSystem. Rather, the default filesystem should only be used for paths that do not specify a FileSystem. This would easily be accomplished by using Path#getFileSystem().

      1. patch_1593_1.patch
        27 kB
        Mahadev konar
      2. patch_1593.patch
        28 kB
        Mahadev konar

        Activity

        Hide
        Mahadev konar added a comment -

        this patch fixes the issue and has unit tests to test case of FSShell being used by non default pathnames.
        So,

        hadoop dfs -lsr hdfs://host:port/path

        works on a non default filesystem
        and the same is true for all the other fs shell commands.

        Show
        Mahadev konar added a comment - this patch fixes the issue and has unit tests to test case of FSShell being used by non default pathnames. So, hadoop dfs -lsr hdfs://host:port/path works on a non default filesystem and the same is true for all the other fs shell commands.
        Hide
        dhruba borthakur added a comment -

        +1 Code looks good. There are a few blank-line changes in this patch that can be safely removed.

        Show
        dhruba borthakur added a comment - +1 Code looks good. There are a few blank-line changes in this patch that can be safely removed.
        Hide
        Mahadev konar added a comment -

        removing unwanted spaces in this patch.

        Show
        Mahadev konar added a comment - removing unwanted spaces in this patch.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12375266/patch_1593_1.patch
        against trunk revision 619744.

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

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

        javadoc +1. The javadoc tool did not generate any warning messages.

        javac +1. The applied patch does not generate any new javac compiler warnings.

        release audit +1. The applied patch does not generate any new release audit warnings.

        findbugs +1. The patch does not introduce any new Findbugs warnings.

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1775/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1775/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1775/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1775/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/12375266/patch_1593_1.patch against trunk revision 619744. @author +1. The patch does not contain any @author tags. tests included +1. The patch appears to include 3 new or modified tests. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1775/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1775/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1775/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1775/console This message is automatically generated.
        Hide
        dhruba borthakur added a comment -

        I just committed this. Thanks Mahadev!

        Show
        dhruba borthakur added a comment - I just committed this. Thanks Mahadev!
        Hide
        Hudson added a comment -
        Show
        Hudson added a comment - Integrated in Hadoop-trunk #398 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/398/ )

          People

          • Assignee:
            Mahadev konar
            Reporter:
            Doug Cutting
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development