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>
The newTimer methods in the APIMetrics where modified to pass the url so
an APITimer would be returned from the registry.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds a Timer creation methods to the APIMetricsRegistry, the
newTimer method would create an APITimer and would pass it the url for
quering.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This is a clean up in the APIMetricsRegistry. It replaces snake case to
camel case, and perform a better formatting of the code.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The Timer object in the yammer library is used to regularly check a
histogram.
The APITimer is a Timer that uses the APIHistogram instead that in it
self calls the API to get its values.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This patch replace the Histogram data and statistic calculation from the
JMX proxy to the API.
This way the count, sum, min, max variance and square sum are calculated
always on the server.
When an update is perform, the API would return the statistic with a
sample of the last n elements as a sample.
This implementation insure that the counters are correct. The
implementation also allows to set the minimal update interval.
The implementation adds a mutable getter for each of the parameters so
they could be set to their new value.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The HistogramValue object is used by the APIClient to returns a
histogram object from the API.
It contains the values that are defined in utils.json
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>
"This patch adds the CommitLogMetrics support. It uses the API to retrieve its
values. The API definitions are taken from commitlog.json
After this patch it will be possible to connect with jconsole and see the
CommitLogMetrics."
This Adds the CommitLogMetrics object.
The implementation is based on the API, that define in commitlog.json
After this patch, it will be possible to connect with jconsole and see
the CommitLogMetrics.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
"The column family matrics is a set of data related to the column family.
This series adds an API based on the ColumnFamilyMetrics mbean.
It has a stub implementation, just so the JMX proxy would get a response."
"The CacheMetric is used to return statistics on the cache. This series adds
the definition of the CacheMetric and initilized it in the CacheSerivce.
After this series it will be possible to connect with jconsole and see that
there are 3 mbean available for key, row and counter cache statistics."
"This series adds the CompactionManagerMBean its implementation and its
associated metrics the CompactionMetrics. The implementation is based on the
api that defined in compaction_manager.json.
After the series it will be possible to connect with jconsole and observe the
CompactionManager and CompactionMetrics"
The CompactionMetrics is used to report statistics about compaction. It
is based on calling the API that defined in compaction_manager.json
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the CompactionManagerMBean and its implementation
CompactionManager.
The implementation is based on the API, that is define in
compaction_manager.json
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This patch adds the getListMapStrValue that returns a list of maps and a
helper method to create a map from json list, it
also adds a stub method for CQL queries.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
CacheService holds an instance of cache metrics per: key, row and counter.
This instantiate the different metrics. After this petch it will be
possible to connect with jsconsole and see those metrics
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The CacheMetrics holds information per a specific Cache type (key, row
or counter)
It the clas was modified to use the API. The API definition can be found
in cache_service.json under metrics.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The ColumnFamilyMetrics is used to report statistic of a column family.
This adds an adaptation for the ColumnFamilyMetrics that works with the
API that define in column_family.json
It adds the ColumnFamilyMetrics to the ColumnFamilyStore and expose the
keyspace name, so the ColumnFamilyMetrics would have access to it.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The latency metrics holds a single counter, so there is no need to add
the total_latency to the url it is pointed to.
Removing it, can shorten the url in the API definitions.
This patch adds the implementation for the ColumnFamilyStore by adding
calls to the relevent API that define in column_family.json
This patch also do some clean up, by removing leading underscore from
parameter names and trailing white spaces.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds a helper function to make a string out of a map, by default,
key/names are joing by '=' and entries are joined by ',' but it can be
modified.
It also adds the implementation for getIntArr, which return an array of
ints.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the CacheServiceMBean and its implementation the CacheService
class.
The implementation is based on calls to the API that define in
cache_service.json
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
"This series adds the StorageProxyMBean implementation. It also uses APIMetric
so adaptation for the Metric implementation where made to adopt it to the
current implementation.
Currently, it's simplicity in the server over optimization, if in the futrue
will see that the extra calls to the server causes a problem we can move some
of the logic to the server and save the API calls.
Specifically, the Meter class calculate rate based on counters per interval.
After this patch, the JMX proxy would check for each of the defined values the
API for each of the Metered parameter."
This adds the StorageProxyMBean and implementation.
To keep the same API the relevant matrics where added.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
LatencyMetrics
This import the implementation of CASClientRequestMetrics
ClientRequestMetrics and LatencyMetrics with modification to use the
APIMetrics with a given URL.
The Metrics where added to keep the same naming of of the MBean as they
are in Origin.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the getSetStringValue getMapStringListStrValue, the first
return a set of string and the second a map from a string to a list of
string.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This change update the internal value on each time click, after this
change the rate calculation will be done on the proxy at the price of
continuesly query the server. It is yet to be determine if this is a
problem, if so, it is possible to do and store those calculation on the
server and just pull them on demend.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This change accept a URL for the histogram creation methods and passing
it to the default registry so the created histogram will be the
APIHistogram instead of Histogram.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
From Amnon:
"This series adopt the yammer Metric library to use with out API. The
library it self is taken as is by adding it to the Maven dependency. The
required adaptation is that information will not be added in push to the
library Metric, instead, when required, the specific Metric would use
the APIClient to fetch information from the system using the API.
This approach would mean that there will be little adaptation when code
would be passed from origin."
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Conflicts:
pom.xml
This adds the ColumnFamilyStoreMBean with most of its method stub. The
only current functionality is returnning the column family name and the
registration of the StoreMBean.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the following method implementation that are supported:
getLiveNodes()
getUnreachableNodes()
getTokens()
getTokens(String endpoint)
getCommitLogLocation()
getTokenToEndpointMap()
After applying this series, those functionality will be available via
jconsole
The series also complete the API by adding an implementation based on
the swagger storage_service.json definition. An implementation that
will be added to the API should be reflected in the MBean.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This patch enhence the APICLient with additional support to query
parameters in getStringValue, getListStrValue. New method that will be
aded, will be added with both variation, where the base comunication
method: get can accept a null query parameter object.
An implementation was added for getMapStrValue that retreive a list of
key, value and creates a map out of it.
post and delete with and without query parameters.
getIntValue with query parameters.
getMapListStrValue, getListInetAddressValue, getMapStringSnapshotTabularDataValue
And the helper functions for the query parameter:
join, set_query_param, set_bool_query_param
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the functionality that is used by the JMX from Origin.
The following files where import: FileUtils.java Pair.java
SnapshotDetailsTabularData.java, un needed functionality was removed to
minimize the dependency and they were placed in a util directory.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This is a copy of the Metrics class from yammer, with two differences:
Add a url Metrics that needs it to retrieve data and uses the
APIMetricsRegistry as the Metric factory.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The MetricsRegistry in yammer used to create metrics and register them
in the JMX.
The APIMetricsRegistry extends the functionality by accepting a URL
that the API will perform to retrieve the relevant data, it also creates
the API version of each of the requested Metric (i.e. APIMeter,
APICounter or APIHistogram)
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Three of the Metric in the yammer library are based on data that is
pushed to them: Counter, Histogram and Meter.
This patch modify the specific functionality by inherit the original
Meter, keeping its functionality and API, and modify the way the data is
collected.
For Counter: A call to count will be implementing by calling the API to
retreive a value.
For Meter: A call to count will be implementing by calling the API to
retreive a value, similiar to count, but the timer aspect of the Meter
remains the same.
For histogram: Histogram uses an internal sample container. To mimic the
behaviour, a call to any of the historgram get functionality will update
the sample container first. A timestamp of the last update limits the
number of updates that will be done by the histogram.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The DefaultNameFactory which implement the MetricNameFactory responsible
for the metrics names.
They are imported from Origin and placed under urchin package.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the dependency for the yammer counter library and for the
google collection that are used with it.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>