Search code examples
cassandradatastax-enterprisedatastax-java-driver

How to determine node's workload type in datastax thru java driver


How to determine node's workload type in datastax thru java driver? By workload i mean either node is Solr node in cluster or hadoop node or cassandra node.


Solution

  • The java driver is focused on pure Apache Cassandra, so it is unaware of DataStax Enterprise-specific features such as "workload" type.

    The "dsetool ring" command can be used to manually check workload.

    The workload is stored in a DSE system table called "system.peers", so you can fetch the workload for all nodes EXCEPT the coordinator node using the query "SELECT workload FROM system.peers". Unfortunately, there is no workload column in the system.local table, so, you would have to execute the same query on another node to determine the workload for a specific node.

    I'll file an internal DSE issue on this since it is undocumented, and should be easier and obvious.