The API of the session info returns parameters in snake case instead of
camel case.
This patch chagne the expected field to match the API. It was also
modified to accept empty fields and store them as null.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
"The storage_service api was changed to return a map of string, double instead
of formatted numbers. This change update the JMX proxy to support this API.
While going over the code a potential bug was found and was fix.
The series adds method to the APIClient to return a map of string, double and
uses that function to call the API."
The API was modify to return the load map as a map of string to double
instead of formatted string.
This patch change the code to support the udpated API.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch adds a method to the APIClient that return a map of String
and Double.
It support both simple and with query parameters.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch clean the redundant output the jmx proxy creates.
It set the trace level of the called method to finest and remove some
println leftovers.
Fixes#22
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
The API now uses explicit parameters to pass the parameters to repair.
This patch changes how the parameters are passed to the API to be
compatible with the changed API.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Reviewed-by: Nadav Har'El <nyh@scylladb.com>
"nodetool repair" ends up calling one of the dozen forceAsyncRepair()
functions. This function ignored its option rather than passing it on,
so this patch fixes that.
Note that there are still many more forceAsyncRepair() overloads which
similarly ignore their options, and it is possible that certain invocation
of "nodetool repair" will need them, so we will need to fix all of them
in the future.
After this patch, "nodetool repair" no longer works because now Scylla
needs to be fixed to understand the "parallelism" and "incremental" options
passed to it.
Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Scylla's repair REST API (see scylla/api/storage_service.cc) takes all
repair options as one "options" string. The options are separated by ",",
and for each option, the name and value are separated by ":". The existing
code wrongly used "=" instead of ":", so this patch fixes it.
Signed-off-by: Nadav Har'El <nyh@scylladb.com>
The describeRingJMX method, returns a formated output. The output should
be similiar to origin as oppose to the current implementation that
returns a json representation.
After the change an example of nodetool describering:
$ nodetool describering keyspace1
Schema Version:1074c31b-1f39-3df2-90ff-7f0b64bb3ea4
TokenRange:
TokenRange(start_token:7485973865401664349,
end_token:-338297331236877217, endpoints:[127.0.0.1],
rpc_endpoints:[127.0.0.1],
endpoint_details:[EndpointDetails(host:127.0.0.1,
datacenter:datacenter1, rack:rack1)])
TokenRange(start_token:-338297331236877217,
end_token:7485973865401664349, endpoints:[127.0.0.2],
rpc_endpoints:[127.0.0.2],
endpoint_details:[EndpointDetails(host:127.0.0.2,
datacenter:datacenter1, rack:rack1)])
On sycall-jmx:
Fixes#21
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
repairAsync() builds an "options" argument from the options map it gets,
but then forgot to pass this argument to the request :-)
This is part of issue scylladb/#714.
Signed-off-by: Nadav Har'El <nyh@scylladb.com>
The API uses the source_dc as a query parameter, the jmx should use the
same.
In addition, the rebuild method can get null as a datacenter value and
in that case it should not pass a parameter.
Fixesscylladb/scylla#668.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
"After this series the nodetool compacthistory displays:
$ nodetool compactionhistory
Compaction History:
id keyspace_name columnfamily_name compacted_at bytes_in bytes_out rows_merged
09d71860-a3f3-11e5-b1cf-000000000000 system peers 1450269994214 365 365
09d73f70-a3f3-11e5-88b4-000000000001 system local 1450269994215 816 690"
This changes the CompactionManager getCompactionHistory to use the new
get_compaction_history API.
It uses the CompactionHistoryTabularData to parse and report the
results.
After this patch nodetool compactionhistory would work.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch import and modify CompactionHistoryTabularData from origin.
It will be used by the getCompactionHistory method in CompactionManager.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Since scylla-jmx supports to read configuration from scylla.yaml, we
don't need to pass these parameters from program arguments.
Fixes#17.
Signed-off-by: Takuya ASADA <syuu@scylladb.com>
There was a confusion in the API between key and keyspace.
It was changed in the API so the JMX should be modified accordingly.
After this change
nodetool listsnapshots
Will show the current snapshots.
On scylla-jmx:
Fixes#15
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Similiar to origin, the load map should return a formated load value.
After this patch the nodetool status command:
$nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID
Rack
UN 127.0.0.1 394.97 MB 256 ?
292a6c7f-2063-484c-b54d-9015216f1750 rack1
UN 127.0.0.2 151.07 MB 256 ?
102b6ecd-2081-4073-8172-bf818c35e27b rack1
Under scylla-jmx
Fixes#18
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
With the addition of the configuration file, the scylla-jmx should not
add command line configuration parameters by default. Instead, it should
add those parameters only if they are explicitely given to it.
Fixes#16.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
"This series import the GCInspectorMBean and its implementation from origin.
This would solve the warning given by cassandra-stress.
On syclla-jmx
Fixes#14"
Although there is little relevant information in the GC inspector, some
application like cassandra-stress looks for it and fails if it cannot be
found.
This patch import the GCInspectorMBean and its implementation.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
There are cases where the API uses double to return a value that the JMX
expect to be long.
For example in mean column row size. This type difference should not be
a problem and the result should be cast to long or int.
This patch allows the values to be double and cast the result to int or
long.
This fix (scylla-jmx)
Fixes#12
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
When getSSTableCountPerLevel is called and the system is not using level
compaction the expected return is null and not an empty array.
This fix (scylla-jmx)
Fixes#11
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
The column family store API was changed so it would have a single API to
return the snapshot size.
This changes the JMX to use the same API regardless if it is called from
the ColumnFamilyMetrics or from ColumnFamilyStore.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
"This series support API calls that returns an empty histogram. This is a
typical scenario with counters that are not implemented yet, for example range
latency. The trigger for this series is the nodetoold proxyhistograms command
After this series:
./bin/nodetool proxyhistograms
proxy histograms
Percentile Read Latency Write Latency Range Latency
(micros) (micros) (micros)
50% 654949.00 315852.00 NaN
75% 8409007.00 4055269.00 NaN
95% 20924300.00 17436917.00 NaN
98% 25109160.00 20924300.00 NaN
99% 25109160.00 25109160.00 NaN
Min 11865.00 11865.00 NaN
Max 25109160.00 25109160.00 NaN"
The RecentEstimatedHistogram updates its value from the API with an
array of recent values.
This array can be empty, in that case the getBuckets method should just
return a zero size array.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
When creating an estimated histogram from buckets it is a valid option
to get a zero size array as the buckets array.
In that case the newOffsets method would get a negative value for its
size, which should result in a zero length array of offsets.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>