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

Implement a virtual table for sessions

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0
    • Component/s: TajoMaster
    • Labels:
      None

      Description

      Most databases provide a way to get information about active sessions (e.g., pg_stat_activity in postgresql, processlist in mysql, v$session in oracle, and so on).
      But, tajo does not have such table yet.
      Implementing session virtual table would be helpful to monitoring and administration.

      1. TAJO-1537_2.patch
        9 kB
        Hyunsik Choi
      2. TAJO-1537_3.patch
        9 kB
        Hyunsik Choi
      3. TAJO-1537.patch
        9 kB
        Yongjin Choi

        Activity

        Hide
        yongjin.choi Yongjin Choi added a comment -

        Since tajo already had queryable virtual table interface (by Jihun Kang in TAJO-1135), this kind of table can be added without much effort.
        I will upload the patch soon.

        Show
        yongjin.choi Yongjin Choi added a comment - Since tajo already had queryable virtual table interface (by Jihun Kang in TAJO-1135 ), this kind of table can be added without much effort. I will upload the patch soon.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user superpiggy opened a pull request:

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

        TAJO-1537: Implement a virtual table for sessions

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

        $ git pull https://github.com/superpiggy/tajo TAJO-1537

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

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


        commit 1eda15d0736f95bcab7e695e6d9122eb83ffd736
        Author: Yongjin Choi <superpiggy@gmail.com>
        Date: 2015-04-07T08:13:39Z

        TAJO-1537: implement session virtual table


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user superpiggy opened a pull request: https://github.com/apache/tajo/pull/523 TAJO-1537 : Implement a virtual table for sessions You can merge this pull request into a Git repository by running: $ git pull https://github.com/superpiggy/tajo TAJO-1537 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/523.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 #523 commit 1eda15d0736f95bcab7e695e6d9122eb83ffd736 Author: Yongjin Choi <superpiggy@gmail.com> Date: 2015-04-07T08:13:39Z TAJO-1537 : implement session virtual table
        Hide
        yongjin.choi Yongjin Choi added a comment -

        The virtual table name is 'session'.
        The example of this is as follows.

        yjchoi:~$ tsql
        default> select * from information_schema.session;
        session_id,  username,  current_db,  last_access_time
        -------------------------------
        8238f2b6-9fa6-48d2-aba2-676bc671f09e,  yjchoi,  default,  2015-04-07 18:13:56.931999
        
        Show
        yongjin.choi Yongjin Choi added a comment - The virtual table name is 'session'. The example of this is as follows. yjchoi:~$ tsql default> select * from information_schema.session; session_id, username, current_db, last_access_time ------------------------------- 8238f2b6-9fa6-48d2-aba2-676bc671f09e, yjchoi, default, 2015-04-07 18:13:56.931999
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12723627/TAJO-1537.patch
        against master revision release-0.9.0-rc0-244-gd160f6e.

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

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

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        -1 findbugs. The patch appears to introduce 20 new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-server tajo-core.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/724//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/724//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-catalog-server.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/724//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/724//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12723627/TAJO-1537.patch against master revision release-0.9.0-rc0-244-gd160f6e. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 1 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to introduce 20 new Findbugs (version 2.0.3) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-server tajo-core. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/724//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/724//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-catalog-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/724//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/724//console This message is automatically generated.
        Hide
        sirpkt Keuntae Park added a comment -

        Good !
        I think this is useful feature especially to someone familiar with other DBMS.
        However, is there any reason that you released the assignee?

        Show
        sirpkt Keuntae Park added a comment - Good ! I think this is useful feature especially to someone familiar with other DBMS. However, is there any reason that you released the assignee?
        Hide
        yongjin.choi Yongjin Choi added a comment -

        Oh, I didn't realize that. Sorry, that was definitely my mistake.
        I'll assign this issue to myself again.
        I'd really appreciate your feedback.

        Show
        yongjin.choi Yongjin Choi added a comment - Oh, I didn't realize that. Sorry, that was definitely my mistake. I'll assign this issue to myself again. I'd really appreciate your feedback.
        Hide
        hyunsik Hyunsik Choi added a comment -

        rebased.

        Show
        hyunsik Hyunsik Choi added a comment - rebased.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/523#issuecomment-103011097

        This work looks good to me. But, it only handles pre-defined session variables. It would be better if this session table can handle all user session variables.

        You look busy. If you don't mind, I'll improve the session table to support all user variables.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/523#issuecomment-103011097 This work looks good to me. But, it only handles pre-defined session variables. It would be better if this session table can handle all user session variables. You look busy. If you don't mind, I'll improve the session table to support all user variables.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/523#issuecomment-103011763

        In addition, this patch allows each user to see all session variables of all other users. It seems to be dangerous. It would be better to allow a user to see its own session's variables. I'll change it as I mentioned.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/523#issuecomment-103011763 In addition, this patch allows each user to see all session variables of all other users. It seems to be dangerous. It would be better to allow a user to see its own session's variables. I'll change it as I mentioned.
        Hide
        hyunsik Hyunsik Choi added a comment -

        Improved the patch.

        Show
        hyunsik Hyunsik Choi added a comment - Improved the patch.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user hyunsik opened a pull request:

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

        TAJO-1537: Implement a virtual table for sessions.

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

        $ git pull https://github.com/hyunsik/tajo TAJO-1537

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

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


        commit 3e6db43ce2b8257bffc0834cead3dd06bd33ad5a
        Author: Hyunsik Choi <hyunsik@apache.org>
        Date: 2015-05-18T10:25:23Z

        TAJO-1537: Implement a virtual table for sessions.

        commit 2554deccfe7d6a1628408f54e0341618aba3a913
        Author: Hyunsik Choi <hyunsik@apache.org>
        Date: 2015-05-18T11:01:29Z

        change unit tests and session table schema.


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user hyunsik opened a pull request: https://github.com/apache/tajo/pull/576 TAJO-1537 : Implement a virtual table for sessions. You can merge this pull request into a Git repository by running: $ git pull https://github.com/hyunsik/tajo TAJO-1537 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tajo/pull/576.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 #576 commit 3e6db43ce2b8257bffc0834cead3dd06bd33ad5a Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-05-18T10:25:23Z TAJO-1537 : Implement a virtual table for sessions. commit 2554deccfe7d6a1628408f54e0341618aba3a913 Author: Hyunsik Choi <hyunsik@apache.org> Date: 2015-05-18T11:01:29Z change unit tests and session table schema.
        Hide
        tajoqa Tajo QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12733506/TAJO-1537_2.patch
        against master revision release-0.9.0-rc0-301-g3870a61.

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

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

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-server tajo-core.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/791//testReport/
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/791//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12733506/TAJO-1537_2.patch against master revision release-0.9.0-rc0-301-g3870a61. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 1 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-server tajo-core. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/791//testReport/ Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/791//console This message is automatically generated.
        Hide
        tajoqa Tajo QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12733514/TAJO-1537_3.patch
        against master revision release-0.9.0-rc0-301-g3870a61.

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

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

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-server tajo-core.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/792//testReport/
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/792//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12733514/TAJO-1537_3.patch against master revision release-0.9.0-rc0-301-g3870a61. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 4 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-catalog/tajo-catalog-server tajo-core. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/792//testReport/ Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/792//console This message is automatically generated.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user jihoonson commented on the pull request:

        https://github.com/apache/tajo/pull/576#issuecomment-103322307

        +1 LGTM.
        Please remove unused imports before commit.

        Show
        githubbot ASF GitHub Bot added a comment - Github user jihoonson commented on the pull request: https://github.com/apache/tajo/pull/576#issuecomment-103322307 +1 LGTM. Please remove unused imports before commit.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

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

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/tajo/pull/523
        Hide
        hyunsik Hyunsik Choi added a comment -

        I just committed to master branch.

        Show
        hyunsik Hyunsik Choi added a comment - I just committed to master branch.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user hyunsik closed the pull request at:

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

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

        Github user hyunsik commented on the pull request:

        https://github.com/apache/tajo/pull/576#issuecomment-103336158

        committed.

        Show
        githubbot ASF GitHub Bot added a comment - Github user hyunsik commented on the pull request: https://github.com/apache/tajo/pull/576#issuecomment-103336158 committed.
        Hide
        hudson Hudson added a comment -

        ABORTED: Integrated in Tajo-master-CODEGEN-build #353 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/353/)
        TAJO-1537: Implement a virtual table for sessions. (Contributed by Yongjin Choi, Committed by Hyunsik Choi) (hyunsik: rev 52641569e10207e4e2001467060f80ab34119744)

        • tajo-core/src/test/resources/results/TestSelectQuery/testSelectOnSessionTable.result
        • tajo-core/src/main/java/org/apache/tajo/master/exec/NonForwardQueryResultSystemScanner.java
        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
        • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/SessionTableDescriptor.java
        • CHANGES
        • tajo-core/src/test/resources/queries/TestSelectQuery/testSelectOnSessionTable.sql
        • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java
        • tajo-core/src/test/java/org/apache/tajo/master/TestNonForwardQueryResultSystemScanner.java
        • tajo-core/src/main/java/org/apache/tajo/session/SessionManager.java
        Show
        hudson Hudson added a comment - ABORTED: Integrated in Tajo-master-CODEGEN-build #353 (See https://builds.apache.org/job/Tajo-master-CODEGEN-build/353/ ) TAJO-1537 : Implement a virtual table for sessions. (Contributed by Yongjin Choi, Committed by Hyunsik Choi) (hyunsik: rev 52641569e10207e4e2001467060f80ab34119744) tajo-core/src/test/resources/results/TestSelectQuery/testSelectOnSessionTable.result tajo-core/src/main/java/org/apache/tajo/master/exec/NonForwardQueryResultSystemScanner.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/SessionTableDescriptor.java CHANGES tajo-core/src/test/resources/queries/TestSelectQuery/testSelectOnSessionTable.sql tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java tajo-core/src/test/java/org/apache/tajo/master/TestNonForwardQueryResultSystemScanner.java tajo-core/src/main/java/org/apache/tajo/session/SessionManager.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #713 (See https://builds.apache.org/job/Tajo-master-build/713/)
        TAJO-1537: Implement a virtual table for sessions. (Contributed by Yongjin Choi, Committed by Hyunsik Choi) (hyunsik: rev 52641569e10207e4e2001467060f80ab34119744)

        • tajo-core/src/test/resources/queries/TestSelectQuery/testSelectOnSessionTable.sql
        • tajo-core/src/main/java/org/apache/tajo/session/SessionManager.java
        • tajo-core/src/test/java/org/apache/tajo/master/TestNonForwardQueryResultSystemScanner.java
        • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/SessionTableDescriptor.java
        • CHANGES
        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
        • tajo-core/src/test/resources/results/TestSelectQuery/testSelectOnSessionTable.result
        • tajo-core/src/main/java/org/apache/tajo/master/exec/NonForwardQueryResultSystemScanner.java
        • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #713 (See https://builds.apache.org/job/Tajo-master-build/713/ ) TAJO-1537 : Implement a virtual table for sessions. (Contributed by Yongjin Choi, Committed by Hyunsik Choi) (hyunsik: rev 52641569e10207e4e2001467060f80ab34119744) tajo-core/src/test/resources/queries/TestSelectQuery/testSelectOnSessionTable.sql tajo-core/src/main/java/org/apache/tajo/session/SessionManager.java tajo-core/src/test/java/org/apache/tajo/master/TestNonForwardQueryResultSystemScanner.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/SessionTableDescriptor.java CHANGES tajo-core/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java tajo-core/src/test/resources/results/TestSelectQuery/testSelectOnSessionTable.result tajo-core/src/main/java/org/apache/tajo/master/exec/NonForwardQueryResultSystemScanner.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/dictionary/InfoSchemaMetadataDictionary.java

          People

          • Assignee:
            yongjin.choi Yongjin Choi
            Reporter:
            yongjin.choi Yongjin Choi
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development