With the change to APITimer there is no longer a need to periodically
pull the API.
The verb will be register on the object initialization and will be
updated whenever they are been used.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
With the change in the meter implementation, retrieving a non existing
metrics would take time.
For this, the CacheService would mark caches that are not supported with
null url, so the metrics will be register but will return 0 for all
request (instead of going to the API that will return 0).
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
CacheMetrics is a general counter that is used for all possible caches.
For caches that we do not support, there is no need to go and fetch
their values.
When moving to the APITimer each such request will take longer (the
value will not be available as it use it) now it will be possible to
supply a null as a url which would cause to the metrics to return 0 for
all counters.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
The APITimer uses a different endpoint not to break existing API.
The addNano functionality was removed as all of the values are updated
from the APi.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This expose the ColumnFamilyStore registration via static method.
It would allow an external object (ie. MBeanServer) to update the
registration on demand.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch adds the functionality of takeMultipleColumnFamilySnapshot to
StorageService.
It follow origin logic of first check that all keyspaces and column
families exists and has no snapshot with that name and then run snapshot
on each of the combinations.
Two methods where added to simplify the implementation, but that can be
reused. One to get a map from keyspace to column family and one with the
current snapshots.
Fixesscylladb/scylla#1133
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1461659678-22030-1-git-send-email-amnon@scylladb.com>
During upgrade or version inconsistency. The API can return an un
supported state.
Instead of throwing an expcetion the state will be ignore and a warning
will be written to the log.
An example (state where modified in the API)
$ nodetool gossipinfo
/127.0.0.1
generation:1460450456
heartbeat:32
The log shows:
Apr 12, 2016 3:40:20 PM org.apache.cassandra.gms.EndpointState
addApplicationState
WARNING: Unknown application state with id:25
Fixesscylladb/scylla#1164.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1460465073-3567-1-git-send-email-amnon@scylladb.com>
When getting the tokens of the current node, we use the get_token api
call with the local broadcast address.
The current implementation that tries to figure it out from the
configuration is prone to error.
Currently in a configuration where the broadcast address is set to the
local API and the listening API is set to 127.0.0.1 we get a call to
nodetool info will return an exception:
ID : 54185d5d-6f62-4884-814c-5d17c2776de9
Gossip active : true
Thrift active : true
Native Transport active: true
Load : 178.09 KB
Generation No : 1458349593
Uptime (seconds) : 11
Heap Memory (MB) : 47.23 / 247.50
Off Heap Memory (MB) : 2.75
error: Index: 0, Size: 0
-- StackTrace --
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at org.apache.cassandra.tools.NodeProbe.getEndpoint(NodeProbe.java:812)
at org.apache.cassandra.tools.NodeProbe.getDataCenter(NodeProbe.java:830)
at org.apache.cassandra.tools.NodeTool$Info.execute(NodeTool.java:425)
at org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:288)
at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:202)
Becasue getTokens will return an empty list.
This patch changed how broadcast address is deduct. It Adds a reverse
mapping from hostid to ip address and use it with the get local id to
find the ip address in use.
This implementation would probably be replaced by a single API call in
the future.
After the change a call to nodetool info works.
Fixesscylladb/scylla#1027
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1458405434-8491-3-git-send-email-amnon@scylladb.com>
This patch fix the exception handling for connection problem, instead of
ProcessingException it now expect IllegalStateException.
The rest of the functionality remains the same.
Fixes#26
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1458602355-23601-1-git-send-email-amnon@scylladb.com>
The 'nodetool scrub' command ends up calling the variant that is not
wired up to the Scylla API which causes the following error to be
printed out to the user:
[penberg@nero scylla-tools-java]$ ./bin/nodetool scrub
error: For input string: ""
-- StackTrace --
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:592)
at java.lang.Integer.parseInt(Integer.java:615)
at com.scylladb.jmx.api.APIClient.getIntValue(APIClient.java:216)
at com.scylladb.jmx.api.APIClient.getIntValue(APIClient.java:220)
at org.apache.cassandra.service.StorageService.scrub(StorageService.java:1291)
Fix the problem by implementing the said scrub() variant.
Message-Id: <1458035736-26349-1-git-send-email-penberg@scylladb.com>
This patch adds the streaming session files receiving and sending
information. It is needed for the streaming information.
The constructor now expect the file information, so the
sessionInfoCompositeData was changed to add an empty value for them.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This will allow to creat ProgressInfo object from json object and json
Array it needed to report stream file information.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This patch takes the implementation of getTokenToEndpointMap from Origin
which sorts the map result.
Fixesscylladb/scylla#722
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1456142885-20838-1-git-send-email-amnon@scylladb.com>
Fix the stubbed implementation of forceRepairRangeAsync() which is
used, for example, when the "--start-token"/"--end-token" options are
passed to "nodetool repair".
forceRepairRangeAsync() works similarly to the existing forceRepairAsync()
just sending the additional start/end tokens as two new options to the
REST API. Unlike the parallel Cassandra code, we don't do any fancy
processing on these tokens to intersect them with the node's token ranges -
we'll do this intersection in the C++ code, where the repair is actually
done.
Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Message-Id: <1455808238-25692-1-git-send-email-nyh@scylladb.com>
The dropped messages thread pull information from the API, in various
scenario it can face a connection problem (specifically on startup and
shutdown) or other related exception, when scylla shutds down. It shold
ignore the connection problem, as it is been taken care of by another
thread that check the status and will shutdown when needed.
For other exception, it logs them while continue to connect.
Fixesscylladb/scylla#902
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1455799819-17957-1-git-send-email-amnon@scylladb.com>
StorageService.getTokens should return only the tokens of the current
node, not all the tokens.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1454240935-21903-1-git-send-email-amnon@scylladb.com>
This patch uses the system api to set log level.
After this patch the nodetool setloglevel would support modifying a log
level of a log object.
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1453367412-29722-1-git-send-email-amnon@scylladb.com>
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>
"This series together with the cfhistogram series in scylla adds the
missing functionality so that nodetoold cfhistogram would work.
After both series will be apply an execution example is:
./bin/nodetool cfhistograms keyspace1 standard1
keyspace1/standard1 histograms
Percentile SSTables Write Latency Read Latency Partition Size Cell Count
(micros) (micros) (bytes)
50% 0.00 6866.00 4866323.00 310 5
75% 0.00 8239.00 10090808.00 310 5
95% 0.00 20501.00 17436917.00 310 5
98% 0.00 35425.00 25109160.00 310 5
99% 0.00 51012.00 25109160.00 310 5
Min 0.00 2300.00 654950.00 259 5
Max 0.00 20924300.00 25109160.00 310 5"
This patch uses the estimated latency that was added to the column
family metrics to get the recent and estimated latency.
It follows the same logic as origin does to call the logic in metrics.
The following method implementation will be added:
getMemtableColumnsCount
getRecentSSTablesPerReadHistogram
getSSTablesPerReadHistogram
getLifetimeReadLatencyHistogramMicros
getRecentReadLatencyHistogramMicros
getRecentReadLatencyMicros
getLifetimeWriteLatencyHistogramMicros
getRecentWriteLatencyHistogramMicros
getRecentWriteLatencyMicros
getRangeCount
getTotalRangeLatencyMicros
getLifetimeRangeLatencyHistogramMicros
getRecentRangeLatencyHistogramMicros
getRecentRangeLatencyMicros
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This uses the recent estimated histogram and the API based estimated
histogram to support the sstable per read recent and total estimated
histogram.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the depricated total and recent estimated histogram.
It uses the new RecentEstimatedHistogram for the recent value and the
API based estimated histogram for the total latency.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The EstimatedHistogramWrapper is a helper class that holds the API
related data, so that a class that uses an EstimatedHistogram can
replace it with the wrapper and keep most of its code as is.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The existing scylla-jmx code had reversed logic for the success of the repair:
it reported to "nodetool repair" a failure when the repair was successful :-)
Note that "nodetool repair" waits until a FINISHED notification, and then reports
a failure if it previously got any SESSION_FAILED notification; So if repair was
successful, all we need to do is to avoid sending a "SESSION_FAILED" message.
But we don't need to send any additional "SESSION_SUCCESS" message to signal
success. That message type is only used to report progress to the user (a
"session" is part of the repair work, so seeing sessions completing shows
progress), but because Scylla doesn't support this progress report yet, we
can't send these notifications yet, and there's no point in sending one such
message at the end - it's only confusing (especially when the text is the same
as that of the FINISHED message).
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
This cache the get data center and get rack results for 10s, it has a
direct impact on nodetool status and nodetool ring
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
"This series complete the scylla series to support the nodetool cfstatus support.
After this series it will be possible to call nodetoold cfstatus and get a meaningfull output.
An output example:
./bin/nodetool cfstats keyspace1
Keyspace: keyspace1
Read Count: 87657
Read Latency: 1.1418900715287998 ms.
Write Count: 87177
Write Latency: 0.022303761313190406 ms.
Pending Flushes: 0
Table: standard1
SSTable count: 8
SSTables in each level: [ Space used (live): 92356832
Space used (total): 92356832
Space used by snapshots (total): 0
Off heap memory used (total): 106430512
SSTable Compression Ratio: 0.0
Number of keys (estimate): 328672
Memtable cell count: 100000
Memtable data size: 84800254
Memtable off heap memory used: 105906176
Memtable switch count: 4
Local read count: 92854
Local read latency: 1.039 ms
Local write count: 93880
Local write latency: 1.045 ms
Pending flushes: 0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used: 208416
Bloom filter off heap memory used: 524336
Index summary off heap memory used: 0
Compression metadata off heap memory used: 0
Compacted partition minimum bytes: 259
Compacted partition maximum bytes: 310"
The logic of that timer, should be that after some defined time from the
previous request a new one will be sent, the actuall rate is
meaningless and only cause delyed request to be sent in a higher
frequency after the delayed reponse was returned.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This combine the different constructor into one constructor with the
logic and another one that calls it with a default value.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
In origin an undocumented feature (bug?) is that passing null as a host
name for getRack and getDatacenter returns the rack or datacenter
according to the loopbck address.
This follow the same behaviour, so when the host is null, the function
will not fail but will call the API with the local loopback address
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Some of the depricated method in column family are replaced by counters
in Origin. Still, some tools, like nodetool uses the depricated API.
This adds an implementation to some of the depricated method that is
based on the column family counters similiar to origin.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This uses the column family timer to check that the API is still
available.
After MAX_RETRY (currently set to 30s) the proxy will shutdown.
This address issue #2
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the call to the API for the EndpointSnitch, the url are based
on the endpoint_snitch_info.json swagger definition file.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudus-systems.com>
"The API is currently not supporting notification, but the repair
command that perform via the nodetool relays on the notification to know
when the command terminate.
This series adds support for the repair notification, based on a timer
and periodically check if a current repair command was terminated."
This patch adds a notification support for the repair in StorageService.
When a repair command starts a timer is set to check the status of the
repair, when the repair complets it sends notification for the
successful or fail of the repair.
Because jconsole doesn't run method with variable number of parameters
an additional MBean method was added for async repair with only a
keyspace as its parameter.
All the forceAsycRepair methods are mapped to the asyncRepair metod that
replaces them in 2.2, when options will be supported in the repair, it
will be added to the jmx.
After this patch it is possible to register in the jconsole for
notification, perform a forceAsyncRepair and get the notification that
the repair complets
This change adds path parameter support, for the cases that the path
parameter is the last on the path, for example in the ColumnFamily case
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The getEstimatedRowSizeHistogram is based on the column_family.json that
defined in the API.
The implementation in the MBean and in the metrics is now works with the
get histogram as long array method in the client.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the implementation of the effectiveOwnership and getOwnership
in StorageService. It uses the API that defined in storage_service.json.
After this patch the effectiveOwnership and getOwnership will be
available via jconsole.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Some of the depricated function in StorgeProxy uses the Metrics object
to get the information.
This adds an implementation for the following:
getReadOperations
getTotalReadLatencyMicros
getRecentReadLatencyMicros
getTotalReadLatencyHistogramMicros
getRangeOperations
getTotalRangeLatencyMicros
getRecentRangeLatencyMicros
getWriteOperations
getTotalWriteLatencyMicros
getRecentWriteLatencyMicros
It uses the implementation in ClientRequestMetrics without adding new
functionality.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This patch changes the MBeans to 2.1 version, with the changes an empty
stub implementation was added to the implementation so the code can
compile.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This patch cleans the file formatting of ColumnFamilyStore, CommitLog,
StorageProxy and StorageService.
Those files will be modified when moving to 2.1
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This changes the Timer in ColumnFamilyMetrics, CommitLogMetrics and
LatencyMetrics to be an APITimer.
The APITimer is passed the url to get the data from.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the StorageMetrics, the implementation is based on the API.
The API definition are in storage_service under the metrics part.
After this patch, it will be possible to connect with jconsole and see
the StorageMetrics mbean.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>