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

Printout message before terminating TSQL

    Details

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

      Description

      In ExitCommand::invoke, the code line is written that printout "bye!" before terminating. But, There is no sout.flush() before exit(0) so that message is not shown.

        Activity

        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user dkhwangbo opened a pull request:

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

        TAJO-1978: Printout message before terminating TSQL

        In ExitCommand::invoke, the code line is written that printout "bye!" before terminating. But, There is no sout.flush() before exit(0) so that message is not shown.

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

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

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

        https://github.com/apache/tajo/pull/861.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 #861


        commit 5eea3f389afc21d0c41a45a81bcb9fa431962aa2
        Author: Dongkyu Hwangbo <hwangbodk@gmail.com>
        Date: 2015-11-16T03:13:02Z

        initial commit


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user dkhwangbo opened a pull request: https://github.com/apache/tajo/pull/861 TAJO-1978 : Printout message before terminating TSQL In ExitCommand::invoke, the code line is written that printout "bye!" before terminating. But, There is no sout.flush() before exit(0) so that message is not shown. You can merge this pull request into a Git repository by running: $ git pull https://github.com/dkhwangbo/tajo TAJO-1978 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/861.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 #861 commit 5eea3f389afc21d0c41a45a81bcb9fa431962aa2 Author: Dongkyu Hwangbo <hwangbodk@gmail.com> Date: 2015-11-16T03:13:02Z initial commit
        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/861#discussion_r44898585

        — Diff: tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ExitCommand.java —
        @@ -37,6 +37,7 @@ public String getCommand() {
        @Override
        public void invoke(String[] cmd) throws Exception {
        context.getOutput().println("bye!");
        + context.getOutput().flush();
        — End diff –

        ```flush()``` flushes content of buffer to destination. And you can write something again into the stream. ```close()``` flushes content to destination and closes the stream. After execute the command for terminating TSql, we will never write anything anymore. Thus, we need to use ```close()``` instead of ```flush()```.

        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/861#discussion_r44898585 — Diff: tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ExitCommand.java — @@ -37,6 +37,7 @@ public String getCommand() { @Override public void invoke(String[] cmd) throws Exception { context.getOutput().println("bye!"); + context.getOutput().flush(); — End diff – ```flush()``` flushes content of buffer to destination. And you can write something again into the stream. ```close()``` flushes content to destination and closes the stream. After execute the command for terminating TSql, we will never write anything anymore. Thus, we need to use ```close()``` instead of ```flush()```.
        Hide
        githubbot ASF GitHub Bot added a comment -

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

        https://github.com/apache/tajo/pull/861#discussion_r44898813

        — Diff: tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ExitCommand.java —
        @@ -37,6 +37,7 @@ public String getCommand() {
        @Override
        public void invoke(String[] cmd) throws Exception {
        context.getOutput().println("bye!");
        + context.getOutput().flush();
        — End diff –

        @blrunner Thanks for your reply. I apply your comment.

        Show
        githubbot ASF GitHub Bot added a comment - Github user dkhwangbo commented on a diff in the pull request: https://github.com/apache/tajo/pull/861#discussion_r44898813 — Diff: tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ExitCommand.java — @@ -37,6 +37,7 @@ public String getCommand() { @Override public void invoke(String[] cmd) throws Exception { context.getOutput().println("bye!"); + context.getOutput().flush(); — End diff – @blrunner Thanks for your reply. I apply your comment.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

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

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

        FAILURE: Integrated in Tajo-master-CODEGEN-build #592 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/592/)
        TAJO-1978: Printout message before terminating TSQL. (blrunner: rev 74bde9c640053ebcd212a987310d5dd172a0f776)

        • CHANGES
        • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ExitCommand.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-CODEGEN-build #592 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/592/ ) TAJO-1978 : Printout message before terminating TSQL. (blrunner: rev 74bde9c640053ebcd212a987310d5dd172a0f776) CHANGES tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ExitCommand.java
        Hide
        blrunner Jaehwa Jung added a comment -

        Committed to master branch and 0.11.1 branch.

        Show
        blrunner Jaehwa Jung added a comment - Committed to master branch and 0.11.1 branch.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #975 (See https://builds.apache.org/job/Tajo-master-build/975/)
        TAJO-1978: Printout message before terminating TSQL. (blrunner: rev 74bde9c640053ebcd212a987310d5dd172a0f776)

        • tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ExitCommand.java
        • CHANGES
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #975 (See https://builds.apache.org/job/Tajo-master-build/975/ ) TAJO-1978 : Printout message before terminating TSQL. (blrunner: rev 74bde9c640053ebcd212a987310d5dd172a0f776) tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/ExitCommand.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