This removes a debug print that was left in the code by accident.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1452673361-8242-1-git-send-email-amnon@scylladb.com>
This patch import and modify the StreamingMetrics from orgin. It will
pull periodically the API to check for the current stream and when it
will find any, it will register their MBean.
After this patch during streaming (ie. node is adding to the cluster) it
will be possible to check with jconsole and see the stream.
A nodetool netstats example:
$ nodetool netstats
Mode: NORMAL
Bootstrap 331955a0-aeff-11e5-895c-000000000000
/127.0.0.2
Sending 1 files, 140724545317112 bytes total. Already sent 0
files, 0 bytes total
Read Repair Statistics:
Attempted: 6
Mismatch (Blocking): 0
Mismatch (Background): 0
Pool Name Active Pending Completed
Commands n/a 0 85
Responses n/a 0 46
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
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 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 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>
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>
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>
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 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>
"This series adds some deprecated methods implemenetation to the CacheService
depnding on its metrics.
It also stub the getDrainProgress in StorageService."
This patch adds the describering method to StorageService, the
implementation is based on the storage_service API that is define in
storage_service.json
The implementation reflect the changes in the API, that returns an
object vs. the jmx_describe ring.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Signed-off-by: Pekka Enberg <penberg@scylladb.com>
When calling the API move method, the proxy should pass the new_token
parameter.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Signed-off-by: Pekka Enberg <penberg@scylladb.com>
Drain progress is not implemented yet, it is needed by the nodetool
command so it will not fail.
This patches the functionality until the API will be ready, which, in
that time it would be revert.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch follow origin in the implementation of the depricated methods
in CacheService. It propogate the request to the relevant metrics.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
The depricated recent hit rate implementation was add from Origin as it
is still been used by external system.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
"This series adds the jmx implementation to enable netstats.
After this series netstats should complete successfuly.
A run example:
$ ./bin/nodetool netstats
Mode: NORMAL
repair 397c91a0-8205-11e5-83e4-000000000001
repair 3977d5ba-8205-11e5-83e4-000000000001
repair 3977d624-8205-11e5-83e4-000000000001
repair 397c8fc8-8205-11e5-83e4-000000000001
.......
......
repair 3977d502-8205-11e5-83e4-000000000001
Read Repair Statistics:
Attempted: 1
Mismatch (Blocking): 0
Mismatch (Background): 0
Pool Name Active Pending Completed
Commands n/a 0 21182
Responses n/a 0 597"
This patch adds the registration of StreamManagerMBean to
StorageService, similiar to the way it is done in origin.
After this patch the StreamManager will be available via Jconsole.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch adds the implementation of:
getResponsePendingTasks()
getResponseCompletedTasks()
getDroppedMessages()
The implementation is based on the messaging_service API that defined in
messaging_service.json.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
The StreamManager getStreams returns an hirarchy of classes. This patch
import StreamManagerMBean with the class hirarchy and add an
implementation to StreamManager.
The implementation is based on the stream_manager API.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
The API returns errors with an HTTP code 400, 404 or 500 depending on
the cause with a json object that contains the failure reason. The
error message should be populate to the JMX calling client, translated
to the appropriate exception.
This patch adds the ability to detect API failure and throw a runtime
exception with the returned message.
It is up to the calling method what to do with the exception, if it
would do nothing, the calling client would get a RuntimeException,
depends on origin MBean definition, the caller can catch the exception
and throw a specific kind.
Note that any exception that is thrown must be known to the JMX client
or it will not be able to process it.
As a first step, this patch replaces the jersey client to the newer
version under glassfish, which has an easy way of getting a Reply
object, and check its status before returning the results.
The only difference in the method that uses the APIClient is the use of
MultivaluedHashMap.
The following MBean implementation where changed
ColumnFamily
CompactionManager
Gossiper
EndpointSnitchInfo
CacheService
StorageProxy
StorageService
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
There is a confusion in origin, the MBean declare token as the parameter
to remove, but the implementation actually uses host id.
This patch modify scylla implementation to pass a host id as the
parameter to remove.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
"This series adds latency related depricated methods to the storage
proxy.
The implmenetation mimic origin, in which the depricated methods calls
the counters that replaces them."
In LatencyMetrics the URL is passed without the ending slash, this
patch use the same notation in ClientRequestMetrics.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This follow origin by adding the implementation for the depricated
metrics methods.
Similiar to origin, the implementation calls the implementation in the
metrics.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>