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

Pranav edited comment on CASSANDRA-18837 at 4/24/25 9:21 AM:
-------------------------------------------------------------

Hi [~jeromatron] ,

I looked into this, and while the driver doesn't directly expose datacenter 
names, we can retrieve them using a CQL query. The system keyspace has peer and 
local tables, both of which include datacenter information that can be used for 
this.

>From what I found, the main need for datacenter autocompletion usually comes 
>up during CQL commands like
CREATE KEYSPACE <keyspace_name> WITH replication = {'class': 
'NetworkTopologyStrategy', 

At this point, when pressing tab, cqlsh just shows dc_name instead of listing 
the actual available datacenters. It would be helpful if cqlsh could 
autocomplete based on the cluster data.

Let me know what you think. As a beginner level contributor, i could really use 
your guidance and insights.

PR: https://github.com/apache/cassandra/pull/4113


was (Author: JIRAUSER308865):
Hi [~jeromatron] ,

I looked into this, and while the driver doesn't directly expose datacenter 
names, we can retrieve them using a CQL query. The system keyspace has peer and 
local tables, both of which include datacenter information that can be used for 
this.

>From what I found, the main need for datacenter autocompletion usually comes 
>up during CQL commands like
CREATE KEYSPACE <keyspace_name> WITH replication = {'class': 
'NetworkTopologyStrategy', 

At this point, when pressing tab, cqlsh just shows dc_name instead of listing 
the actual available datacenters. It would be helpful if cqlsh could 
autocomplete based on the cluster data.

Let me know what you think. As a beginner level contributor, i could really use 
your guidance and insights.

> Tab complete datacenter values in cqlsh
> ---------------------------------------
>
>                 Key: CASSANDRA-18837
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18837
>             Project: Apache Cassandra
>          Issue Type: Task
>          Components: CQL/Interpreter
>            Reporter: Jeremy Hanna
>            Priority: Normal
>             Fix For: 5.x
>
>
> cqlsh has a number of great tab completions.  For example, when creating a 
> keyspace it will tab complete the syntax for options and give you options for 
> the replication strategy.  It doesn't show options for the data centers, 
> which would be nice to have.  The server has access to the list of data 
> centers in the cluster.  So there shouldn't be a reason why that couldn't tab 
> complete.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to