[ 
https://issues.apache.org/jira/browse/CASSANDRA-16378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17463358#comment-17463358
 ] 

Tibor Repasi commented on CASSANDRA-16378:
------------------------------------------

Finally, nodetool can also expose the options (admittedly, is not very pretty)

{code}
% bin/nodetool clientstats --all
Address                   SSL   Cipher    Protocol  Version User      Keyspace 
Requests Driver-Name                                  Driver-Version 
Client-Options
localhost/127.0.0.1:50576 false undefined undefined 5       anonymous          
3        DataStax Python Driver                       3.25.0         
{"DRIVER_VERSION":"3.25.0","DRIVER_NAME":"DataStax Python 
Driver","CQL_VERSION":"3.4.5"}
/127.0.0.1:50594          false undefined undefined 5       anonymous          
3        DataStax Java driver for Apache Cassandra(R) 4.13.0         
{"DRIVER_NAME":"DataStax Java driver for Apache 
Cassandra(R)","APPLICATION_VERSION":"1.2.3","DRIVER_VERSION":"4.13.0","CLIENT_ID":"e502fa5a-7e63-4c30-b960-7b41870a8bd9","APPLICATION_NAME":"TestApp","CQL_VERSION":"3.0.0"}
localhost/127.0.0.1:50575 false undefined undefined 5       anonymous          
16       DataStax Python Driver                       3.25.0         
{"DRIVER_VERSION":"3.25.0","DRIVER_NAME":"DataStax Python 
Driver","CQL_VERSION":"3.4.5"}
/127.0.0.1:50593          false undefined undefined 5       anonymous          
18       DataStax Java driver for Apache Cassandra(R) 4.13.0         
{"DRIVER_NAME":"DataStax Java driver for Apache 
Cassandra(R)","APPLICATION_VERSION":"1.2.3","DRIVER_VERSION":"4.13.0","CLIENT_ID":"e502fa5a-7e63-4c30-b960-7b41870a8bd9","APPLICATION_NAME":"TestApp","CQL_VERSION":"3.0.0"}

Total connected clients: 4

User      Connections
anonymous 4
{code}


> Expose application_name and application_version in virtual table 
> system_views.clients
> -------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-16378
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16378
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Feature/Virtual Tables
>            Reporter: Tibor Repasi
>            Assignee: Tibor Repasi
>            Priority: Normal
>              Labels: AdventCalendar2021, gsoc2021, lhf, mentor
>
> Recent java-driver's 
> [com.datastax.oss.driver.api.core.session.SessionBuilder|https://docs.datastax.com/en/drivers/java/4.9/com/datastax/oss/driver/api/core/session/SessionBuilder.html]
>  respects properties 
> [ApplicationName|https://docs.datastax.com/en/drivers/java/4.9/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withApplicationName-java.lang.String-]
>  and 
> [ApplicationVersion|https://docs.datastax.com/en/drivers/java/4.9/com/datastax/oss/driver/api/core/session/SessionBuilder.html#withApplicationVersion-java.lang.String-].
> It would be helpful to exposed this information via virtual table 
> {{system_views.clients}} and with {{nodetool clientstats}}.
> +Additional information for newcomers:+
> The drivers can send as part of the {{STARTUP MESSAGE}} the 
> {{APPLICATION_NAME}} and {{APPLICATION_VERSION}} options. To new volatile 
> fields {{applicationName}} and {{applicationVersion}} need to be added to 
> {{ClientState}} in a similar way to {{driverName}} and {{driverVersion}}.
> The  {{APPLICATION_NAME}} and {{APPLICATION_VERSION}} optionsneed to be 
> retrieved in {{StartupMessage#execute}} and passed to the {{ClientState}}. 
> The new {{application_name}} and {{application_version}} columns need to be 
> added to the {{system_views.clients}} represented by the {{ClientsTable}} 
> class. The data then need to be retrieved from the {{ClientState}} through 
> {{ConnectedClient}}.
> Some unit tests similat to {{SettingsTableTest}} should be added. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to