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 method returns the estimated histogram buckets. It is based on the
module definied in utils.json in the API.
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>
This adds the implementation to the stubed getMapInetAddressFloatValue,
it gets an array of 'key', 'value' and translate it into a map of key to
float.
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>
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 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."
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 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 FailureDetectorMBean and its implementation.
Setting the phi is not supported yet and will be added when the code
will be completed inside the failure_detector implementation.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the implementation of the Gossiper MBean.
To test, run an urchin server, run the API and use jconsole to connect
to the API.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds a post method to the APIClient to perform POST command on the
API and uses the queryParams API to add query parameters to a query.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds two of the supported CommitLog method, the
getActiveSegmentNames and the getArchivingSegmentNames.
The API for both returns full path, so the JMX API takes the file name
from the path and remove duplicates.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This was a code that was modified from Origin, in the JMX API
initilization is done in the custructor, which mean that it would enter
an endless loop.
When initiliation in the constructor this should be used.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The urchin files (Client and Main) where moved to:
com.cloudius.urchin.api and com.cloudius.urchin.main respectively.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
This adds a stub of the StorageService.
After applying it, it will be possible to use JConsole to connect to the
process and run any of the command and inquire all the properties.
Some deprecated methods uses RepairParallelism class, an empty
implementation for it is added. It would be removed with future version
of the MBean, when those methods will be removed from the MBean
As this is a stub, the only effect is a printout on the screen.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
The client hides the comunication details between the jmx and the REST
API.
The current stub was created so an MBean that uses it, can compile and
run with no errors.
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
This adds the java project that expose the system MBean.
The Main would start any required classes and would wait forever.
The mvn creates jar with main and set the classpath accordingly.
To start do:
java -jar target/urchin-mbean-1.0.jar
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>