Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.19.0
    • Component/s: scripts
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Adds a new contrib, bash-tab-completion, which enables bash tab completion for the bin/hadoop script. See the README file in the contrib directory for the installation.

      Description

      The attached Bash script adds support for tab completion of most arguments to the main Hadoop script (bin/hadoop). Namely, it allows tab completion of all the command names, subcommands for the fs, dfsadmin, job, namenode and pipe commands, arguments of the jar command and most arguments to the fs subcommands (completing local and dfs paths as appropriate).

      The file can be dropped into /etc/bash_completion.d/ on Debian-like distros, and it should then start working the next time Bash is started.

      1. hadoop-bash-tab-completion
        5 kB
        Chris Smith
      2. hadoop-bash-tab-completion
        4 kB
        Chris Smith

        Activity

        Hide
        Enis Soztutar added a comment -

        Very useful patch.
        We can include this in a new contrib bash-tab-completion. Could you please provide a patch for it, and supply a README file.
        More minor thing I noticed is that it displays "or" as a first command (I guess originating from the hadoop script).

        Show
        Enis Soztutar added a comment - Very useful patch. We can include this in a new contrib bash-tab-completion. Could you please provide a patch for it, and supply a README file. More minor thing I noticed is that it displays "or" as a first command (I guess originating from the hadoop script).
        Hide
        Chris Smith added a comment -

        Attached patch that puts the script in src/contrib/bash-tab-completion, and includes a README file.

        Also fixed the off-by-one error which caused 'or' to be suggested as a top-level command.

        Show
        Chris Smith added a comment - Attached patch that puts the script in src/contrib/bash-tab-completion, and includes a README file. Also fixed the off-by-one error which caused 'or' to be suggested as a top-level command.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12385764/hadoop-bash-tab-completion
        against trunk revision 676069.

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +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 warnings.

        -1 release audit. The applied patch generated 210 release audit warnings (more than the trunk's current 209 warnings).

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/testReport/
        Release audit warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/artifact/trunk/current/releaseAuditDiffWarnings.txt
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/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/12385764/hadoop-bash-tab-completion against trunk revision 676069. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +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 warnings. -1 release audit. The applied patch generated 210 release audit warnings (more than the trunk's current 209 warnings). +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/testReport/ Release audit warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/artifact/trunk/current/releaseAuditDiffWarnings.txt Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2845/console This message is automatically generated.
        Hide
        Chris Smith added a comment -

        Added ASF license to the script

        Show
        Chris Smith added a comment - Added ASF license to the script
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12385967/hadoop-bash-tab-completion
        against trunk revision 676069.

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

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +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 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.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2857/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2857/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2857/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2857/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/12385967/hadoop-bash-tab-completion against trunk revision 676069. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +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 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. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2857/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2857/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2857/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2857/console This message is automatically generated.
        Hide
        Chris Smith added a comment -

        I don't think it's hugely practical (it requires bash and a working Hadoop install, and its inputs and outputs are env vars) or necessary (it's relatively simple, and flexible enough to work against 0.16.x and 0.19.x, so I don't think that [m]any changes in the future will affect it) to unit test this, so would propose that it's included as-is

        Show
        Chris Smith added a comment - I don't think it's hugely practical (it requires bash and a working Hadoop install, and its inputs and outputs are env vars) or necessary (it's relatively simple, and flexible enough to work against 0.16.x and 0.19.x, so I don't think that [m] any changes in the future will affect it) to unit test this, so would propose that it's included as-is
        Hide
        Enis Soztutar added a comment -

        I've committed this. Thanks Chris !

        Show
        Enis Soztutar added a comment - I've committed this. Thanks Chris !
        Hide
        Hudson added a comment -
        Show
        Hudson added a comment - Integrated in Hadoop-trunk #581 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/581/ )

          People

          • Assignee:
            Chris Smith
            Reporter:
            Chris Smith
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development