Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1980

Printout the usage of TajoShellCommand

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.12.0, 0.11.1
    • Component/s: SQL Shell
    • Labels:

      Description

      TajoShellCommand::getUsage() is designed for TajoShellCommand::printHelp() to printout detailed-usage like TajoShellCommand::getDescription(). But, Currently, It's omitted in TajoShellCommand::printHelp(), so TajoShellCommand::getUsage() has no usage.

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user dkhwangbo opened a pull request:

        https://github.com/apache/tajo/pull/863

        TAJO-1980: Printout the usage of TajoShellCommand

        ```TajoShellCommand::getUsage()``` is designed for ```TajoShellCommand::printHelp()``` to printout detailed-usage like ```TajoShellCommand::getDescription()```. But, Currently, It's omitted in ```TajoShellCommand::printHelp()```, so ```TajoShellCommand::getUsage()``` has no usage.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/dkhwangbo/tajo TAJO-1980

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/tajo/pull/863.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #863


        commit f49ae4bd8eef17397d5d1f965abfe4efea5e5d16
        Author: Dongkyu Hwangbo <hwangbodk@gmail.com>
        Date: 2015-11-17T08:36:01Z

        initial commit


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user dkhwangbo opened a pull request: https://github.com/apache/tajo/pull/863 TAJO-1980 : Printout the usage of TajoShellCommand ```TajoShellCommand::getUsage()``` is designed for ```TajoShellCommand::printHelp()``` to printout detailed-usage like ```TajoShellCommand::getDescription()```. But, Currently, It's omitted in ```TajoShellCommand::printHelp()```, so ```TajoShellCommand::getUsage()``` has no usage. You can merge this pull request into a Git repository by running: $ git pull https://github.com/dkhwangbo/tajo TAJO-1980 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/863.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #863 commit f49ae4bd8eef17397d5d1f965abfe4efea5e5d16 Author: Dongkyu Hwangbo <hwangbodk@gmail.com> Date: 2015-11-17T08:36:01Z initial commit
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user dkhwangbo commented on the pull request:

        https://github.com/apache/tajo/pull/863#issuecomment-157566890

        @blrunner Hi! This PR is related to TAJO-1979.

        Show
        githubbot ASF GitHub Bot added a comment - Github user dkhwangbo commented on the pull request: https://github.com/apache/tajo/pull/863#issuecomment-157566890 @blrunner Hi! This PR is related to TAJO-1979 .
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/863#issuecomment-157631579

        You need to add some unit test cases to ```TestTajoCli``` because this patch will change the result of tsql help command.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/863#issuecomment-157631579 You need to add some unit test cases to ```TestTajoCli``` because this patch will change the result of tsql help command.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user dkhwangbo commented on the pull request:

        https://github.com/apache/tajo/pull/863#issuecomment-157961866

        @blrunner Thanks for your review. I add unit test.

        Show
        githubbot ASF GitHub Bot added a comment - Github user dkhwangbo commented on the pull request: https://github.com/apache/tajo/pull/863#issuecomment-157961866 @blrunner Thanks for your review. I add unit test.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on a diff in the pull request:

        https://github.com/apache/tajo/pull/863#discussion_r45320720

        — Diff: tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java —
        @@ -561,4 +562,26 @@ public void printProgress(PrintWriter sout, QueryStatus status)

        { //nothing to do }

        }
        +
        + @Test
        + public void testDefaultPrintHelp() throws IOException, NoSuchMethodException {
        + Iterator i = tajoCli.getContext().getCommands().keySet().iterator();
        — End diff –

        If you use ```entrySet()``` instead of ```keySet().iterator()```, test codes would be more simple.

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on a diff in the pull request: https://github.com/apache/tajo/pull/863#discussion_r45320720 — Diff: tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java — @@ -561,4 +562,26 @@ public void printProgress(PrintWriter sout, QueryStatus status) { //nothing to do } } + + @Test + public void testDefaultPrintHelp() throws IOException, NoSuchMethodException { + Iterator i = tajoCli.getContext().getCommands().keySet().iterator(); — End diff – If you use ```entrySet()``` instead of ```keySet().iterator()```, test codes would be more simple.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user dkhwangbo commented on the pull request:

        https://github.com/apache/tajo/pull/863#issuecomment-158260538

        @blrunner Thanks for your comment! I make test code little bit more simple using ```entrySet()``` .

        Show
        githubbot ASF GitHub Bot added a comment - Github user dkhwangbo commented on the pull request: https://github.com/apache/tajo/pull/863#issuecomment-158260538 @blrunner Thanks for your comment! I make test code little bit more simple using ```entrySet()``` .
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user blrunner commented on the pull request:

        https://github.com/apache/tajo/pull/863#issuecomment-158329590

        +1

        LGTM!

        Show
        githubbot ASF GitHub Bot added a comment - Github user blrunner commented on the pull request: https://github.com/apache/tajo/pull/863#issuecomment-158329590 +1 LGTM!
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/tajo/pull/863

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/863
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-CODEGEN-build #598 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/598/)
        TAJO-1980: Printout the usage of TajoShellCommand. (blrunner: rev ef682ccc9e3b187ccc52810eac184ad2b149c4ba)

        • CHANGES
        • tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java
        • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/TajoShellCommand.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #598 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/598/ ) TAJO-1980 : Printout the usage of TajoShellCommand. (blrunner: rev ef682ccc9e3b187ccc52810eac184ad2b149c4ba) CHANGES tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/TajoShellCommand.java
        Hide
        blrunner Jaehwa Jung added a comment -

        Dongkyu Hwangbo

        Thank you for your contribution.
        I've just committed to master branch and 0.11.1 branch.

        Show
        blrunner Jaehwa Jung added a comment - Dongkyu Hwangbo Thank you for your contribution. I've just committed to master branch and 0.11.1 branch.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #983 (See https://builds.apache.org/job/Tajo-master-build/983/)
        TAJO-1980: Printout the usage of TajoShellCommand. (blrunner: rev ef682ccc9e3b187ccc52810eac184ad2b149c4ba)

        • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/TajoShellCommand.java
        • tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java
        • CHANGES
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #983 (See https://builds.apache.org/job/Tajo-master-build/983/ ) TAJO-1980 : Printout the usage of TajoShellCommand. (blrunner: rev ef682ccc9e3b187ccc52810eac184ad2b149c4ba) tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/TajoShellCommand.java tajo-core-tests/src/test/java/org/apache/tajo/cli/tsql/TestTajoCli.java CHANGES

          People

          • Assignee:
            dkhwangbo Dongkyu Hwangbo
            Reporter:
            dkhwangbo Dongkyu Hwangbo
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development