GitHub user kkhatua opened a pull request:
https://github.com/apache/drill/pull/1076
DRILL-6036: Create sys.connections table
Introduced a distributed (i.e. each Drillbit executes a fragment) system
table to list all the active client connections to all the Drillbits in a
cluster. This is achieved by having the UserServer maintain a static
(class-level) map of these connections, which is updated as and when
connections are established and closed.
The following details are provided by the table:
user
targetUser
client
drillbit
established
duration
queries
isAuthenticated
isEncrypted
usingSSL
session
A sample run shows the following:
```
[root@kk190 ~]# /opt/mapr/drill/apache-drill-1.13.0/bin/sqlline -u
"jdbc:drill:drillbit=`hostname -i`" -n kunal
...
apache drill 1.13.0-SNAPSHOT
"just drill it"
0: jdbc:drill:drillbit=10.10.106.190> select * from sys.connections;
+------------+-------------+----------------+---------------+--------------------------+------------+----------+------------------+--------------+-----------+---------------------------------------+
| user | targetUser | client | drillbit |
established | duration | queries | isAuthenticated | isEncrypted |
usingSSL | session |
+------------+-------------+----------------+---------------+--------------------------+------------+----------+------------------+--------------+-----------+---------------------------------------+
| anonymous | anonymous | 10.10.106.190 | kk190.qa.lab | 2017-12-20
10:27:30.377 | 5.189 sec | 1 | false | false | false
| b95e76ab-be51-4dde-9554-4d31a36e47a5 |
+------------+-------------+----------------+---------------+--------------------------+------------+----------+------------------+--------------+-----------+---------------------------------------+
1 row selected (0.163 seconds)
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kkhatua/drill DRILL-6036
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/1076.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 #1076
----
commit 3cff0ec8f126f9c8f26ec1b1e4d07a31e553993c
Author: Kunal Khatua <kkhatua@...>
Date: 2017-12-20T18:28:15Z
DRILL-6036: Create sys.connections table
Introduced a distributed (i.e. each Drillbit executes a fragment) system
table to list all the active client connections to all the Drillbits in a
cluster. This is achieved by having the UserServer maintain a static
(class-level) map of these connections, which is updated as and when
connections are established and closed.
The following details are provided by the table:
user
targetUser
client
drillbit
established
duration
queries
isAuthenticated
isEncrypted
usingSSL
session
----
---