Closed sitano closed 4 years ago
@glommer maybe you will be interested in discussing error handling behavior
current handling of invalid arguments:
$ ./bin/nodetool enableautocompaction ks loads1
nodetool: Scylla API server HTTP POST to URL '/storage_service/auto_compaction/ks' failed: std::_Nested_exception<no_such_column_family> (Can't find a column family loads1 in keyspace ks): std::out_of_range ()
See 'nodetool help' or 'nodetool help <command>'.
$ ./bin/nodetool disableautocompaction ks loads1
$ ./bin/nodetool disableautocompaction ks1 loads1
nodetool: Keyspace [ks1] does not exist.
See 'nodetool help' or 'nodetool help <command>'.
$ ./bin/nodetool enableautocompaction ks1 loads1
nodetool: Keyspace [ks1] does not exist.
See 'nodetool help' or 'nodetool help <command>'.
none of these exists but ks
. as it can be seen the behavior is not very consistent at the moment.
align API to the recent changes at https://github.com/scylladb/scylla/pull/6176
don't wrap API exceptions into IOException for enableAutoCompaction
related a bit https://github.com/scylladb/scylla-tools-java/pull/165