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>
An empty histogram can return a valid response from the API but without
any buckets.
This is a valid scenario and common for counters of features that are
not supported yet.
In those cases, the APIClient should return a zero length array.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
"This series complete the change in the API that replaces the formatted string
functionality with an API that return an array of objects.
The series import from origin the helper classes: ApplicationState,
EndpointState and HeartBeatState and modify them to accept their values from
the API.
After this seris will be applied nodetool gossipinfo will have the same output
as origin has."
This patch change getAllEndpointStates implementation. The proxy now
gets from the API a list of objects, it creates the endpoint map from it
and create the result string.
After this patch the nodetool gossipinfo should be formatted like
origin.
After this patch the nodetool gossipinfo return:
./bin/nodetool gossipinfo
127.0.0.2
generation:1447850743
heartbeat:78
RACK:rack1
DC:datacenter1
HOST_ID:459137d7-2c7c-4b65-9ef8-f1c93b29dd6b
RPC_ADDRESS:127.0.0.2
RELEASE_VERSION:2.1.8
LOAD:86677
STATUS:NORMAL,9219539092146142451
SCHEMA:59adb24e-f3cd-3e02-97f0-5b395827453f
NET_VERSION:0
127.0.0.1
generation:1447850742
heartbeat:75
RACK:rack1
DC:datacenter1
HOST_ID:5216770b-6fc5-4d5b-8c87-33304fd87bc8
RPC_ADDRESS:127.0.0.1
RELEASE_VERSION:2.1.8
LOAD:12655
STATUS:NORMAL,927478638459366287
SCHEMA:59adb24e-f3cd-3e02-97f0-5b395827453f
NET_VERSION:0
Fix#508
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch import ApplicationState, EndpointState and HeartBeatState
from origin that are used to report the endpoint state map.
The classes where modified to be created by the API objects.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
getRecentTotalTimeouts
This patch adds the impelementation for the depricated method
getRecentTimeoutsPerHost and getRecentTotalTimeouts.
The implementatin is based on origin, the recent version of the method,
return the delta from the last call to the method.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch adds the implementation of the dropped messages and the
recent dropped messages.
The MessagingService holds a timer that periodically load the dropped
messages from the API and distribute the results between the
DroppedMessagesMetrics instances.
This mimic the timer behaviour in origin, only it does one API call for
all Verb.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch import the DroppedMessageMetrics from origin, as oppose to
origin, it does not run timers but relay on the Messaging sevice.
This save the timer and API call for each of the Verb.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Sometimes it is required that a meter will not handle its own data, like
the APIMeter does.
This patch break the added functionality of APIMeter into two classes,
APISettableMeter is a Meter with a set value method and APIMeter adds
the functionality that reads from the API.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
"This series adds some deprecated methods implemenetation to the CacheService
depnding on its metrics.
It also stub the getDrainProgress in StorageService."