We could also consider augmenting the tool with new named arguments with the 
functionality you described and leave the positional usage intact.

On Thu, Mar 16, 2023, at 6:43 AM, Bowen Song via dev wrote:
> The documented command options are:
> 
>> nodetool tablehistograms [<keyspace> <table> | <keyspace.table>]
>> 
> 
> 
> That means one parameter will be treated as dot separated keyspace and table. 
> Alternatively, two parameters will be treated as the keyspace and table 
> respectively.
> 
> To remain compatible with the documented behaviour, my suggestion is to 
> change the command options to:
> 
>> nodetool tablehistograms [<keyspace> <table> [<table2> [...]] | 
>> <keyspace.table> [<keyspace2.table2> [...]]]
>> 
> Feel free to add the "all except ..." feature to the above.
> 
> This doesn't break backward compatibility in documented ways. It only changes 
> the undocumented behaviour. If someone is using the undocumented behaviour, 
> they must know things may break when the software is upgraded. We can just 
> add a line to the NEWS.txt and let them update their scripts.
> 
> 
> On 16/03/2023 08:53, guo Maxwell wrote:
>> Hello everyone :
>> The nodetool tablehistograms have one argument which you can fill with only 
>> one table name with the format "keyspace_name.table_name /keyspace_name 
>> table_name", so that you can get the table histograms of the specied table.
>> 
>> And  if none arguments is set, all the tables' histograms will be print 
>> out.And if more than 2 arguments (nomatter the format is right or wrong) are 
>> set , all the tables' histograms will also be print out too(Which is a bug 
>> In my mind).
>> 
>> So the usage of nodetool tablehistograms has some usage restrictions, That 
>> is either output one , or all informations.
>> 
>> As CASSANDRA-18296 <https://issues.apache.org/jira/browse/CASSANDRA-18296> 
>> described , I will change the usage of nodetool tablehistograms, which 
>> support the feature below:
>> 1. nodetool tablehistograms ks.tb1 ks.tb2 .... //print out list of tables' 
>> histograms with format keyspace.table
>> 2.nodetool tablehistograms ks1 ks2 ks3 ... //print out list of keyspaces 
>> histograms
>> 3.nodetool tablehistograms -i ks1 ks2 .... //print out list of table 
>> histograms except for the keyspaces list behind the option -i
>> 4.nodetool tablehistograns -i ks ks.tb // print out list tables' histograms 
>> except for table in keyspace ks and ks.tb table.
>> 5.none option specified ,then all tables histograms will be print out.
>> 
>> The usage will breaks compatibility with how it was done previously, and as 
>> this is a user facing tool.
>> 
>> So, What do you think? 
>> 
>> Thanks~~~
>> 

Reply via email to