Commit Graph

215 Commits

Author SHA1 Message Date
Amnon Heiman
5e19158c0f Adding the HistogramValue object
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>
2015-07-14 18:10:53 +03:00
Pekka Enberg
f1d5771679 Merge "Adding The StorageMetrics class" from Amnon
"This patch adds the StorageMetrics class."
2015-07-13 13:52:12 +03:00
Amnon Heiman
7c8b1a86ca Adding the StorageMetrics
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>
2015-07-07 10:28:22 +03:00
Pekka Enberg
65e1f68f62 Merge "Adding the CommitLogMetrics" from Amnon
"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."
2015-07-06 15:53:46 +03:00
Amnon Heiman
68cdf4acf4 Adding 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>
2015-07-06 14:24:59 +03:00
Avi Kivity
3cef1a6f7a Merge "Adding the column family metrics API" from Amnon
"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."
2015-07-05 17:34:48 +03:00
Avi Kivity
16368ca915 Merge "Adding the CacheMetric counters"
"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."
2015-07-05 16:47:53 +03:00
Avi Kivity
f552e0d814 Merge "Adding the CompactionManagerMBean" from Amnon
"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"
2015-07-05 16:47:00 +03:00
Amnon Heiman
81b26d2b53 Adding the 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>
2015-07-02 10:08:00 +03:00
Amnon Heiman
1b36b044fb Instantiating the CompactionManger in Main 2015-07-02 09:23:29 +03:00
Amnon Heiman
84168d40fb Adding the CompactionManagerMBean
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>
2015-07-02 09:21:30 +03:00
Amnon Heiman
ad23e435a1 Enhancing the APIClient
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>
2015-07-02 09:18:34 +03:00
Amnon Heiman
366b744d7b Instantiate the CacheMetrics
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>
2015-07-01 10:11:21 +03:00
Amnon Heiman
19a7daf368 Adding the CacheMetrics class
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>
2015-07-01 10:08:32 +03:00
Amnon Heiman
648c17a93a Adding the ColumnFamilyMetrics
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>
2015-06-30 18:38:18 +03:00
Amnon Heiman
919785bc04 Importing the EstimateHistogram from origin 2015-06-30 18:38:18 +03:00
Amnon Heiman
baf7d101d1 LatencyMetrics: simplify the URL
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.
2015-06-30 18:36:20 +03:00
Amnon Heiman
ae6021233f ColumnFamilyStore: Cleanup and adding missing implementation
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>
2015-06-25 09:47:37 +03:00
Amnon Heiman
c3e9bd6ef7 APIClinet: Add mapToString helper function and intArr impl
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>
2015-06-25 09:47:37 +03:00
Avi Kivity
2e32584436 Merge "Adding the CacheServiceMBean" from Amnon 2015-06-24 18:52:48 +03:00
Amnon Heiman
a7be16ed99 Initilizing the CacheService from Main
This initilize the CacheService MBean in main

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-24 16:50:26 +03:00
Amnon Heiman
769b222173 Adding the CacheServiceMBean and CacheService
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>
2015-06-24 16:48:56 +03:00
Avi Kivity
99a005ce37 Merge "Adding the StorageProxyMBean" from Amnon
"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."
2015-06-22 14:56:01 +03:00
Amnon Heiman
4c63735586 Main starting the StorageProxy API
This start the StorageProxy API

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-18 12:08:16 +03:00
Amnon Heiman
a34df20a74 Adding the StorageProxyMBean
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>
2015-06-18 12:08:16 +03:00
Amnon Heiman
8082ac854b Adding the CASClientRequestMetrics ClientRequestMetrics and
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>
2015-06-18 12:08:16 +03:00
Amnon Heiman
37c09679ff APIClient: add the getLongArrValue implementation
This adds the implementation for getLongArrValue with and without query
parameters support.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-18 12:08:16 +03:00
Amnon Heiman
331c6c13b3 APIClient adding getSetStringValue getMapStringListStrValue
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>
2015-06-18 12:08:16 +03:00
Amnon Heiman
1cf0279644 APIMeter update the included value on each click
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>
2015-06-18 12:08:16 +03:00
Amnon Heiman
d1f85080b4 APIMetrics: Creating an APIHistogram instead of Histogram
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>
2015-06-18 12:08:15 +03:00
Pekka Enberg
a600152de7 Merge 'Adding JMX Metric support'
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
2015-06-17 15:10:30 +03:00
Amnon Heiman
815e5b429c Urching-JMX start the column family registration
This adds a call to the ColumnFamilyStore registration, which runs a
timer and check if there are any changes in the registered Mbean.
2015-06-16 17:16:09 +03:00
Amnon Heiman
3e4cefb6bd Urchin-JMX adding the ColumnFamilyStoreMBean
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>
2015-06-16 17:16:09 +03:00
Amnon Heiman
37a0e6926b Urchin-JMX Cleanup and add a getJsonArray method to the APIClient
This patch adds a method that returns a JsonArray by the APIClient.

It also changes an errounouse string == compare to equals.
2015-06-16 17:15:28 +03:00
Amnon Heiman
afac410a0d Adding StorageService MBean implementation
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>
2015-06-15 16:36:22 +03:00
Amnon Heiman
67abbeb060 Enhencing the APIClient
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>
2015-06-15 16:35:50 +03:00
Amnon Heiman
565d62d4db Importing FileUtils.java Pair.java SnapshotDetailsTabularData.java
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>
2015-06-15 16:35:44 +03:00
Amnon Heiman
f01af948ae Add a NOTICE file for the yammer library
This is the NOTICE file that define in the yammer library for using the
yammer code.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-11 14:32:45 +03:00
Amnon Heiman
7aba32d2fa Adding the APIMetrics
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>
2015-06-11 14:11:25 +03:00
Amnon Heiman
1212e09ffd Adding the APIMetricsRegistry the metric factory
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>
2015-06-11 14:08:10 +03:00
Amnon Heiman
dd2d50a45c Overriden the Metric data collection
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>
2015-06-11 11:53:51 +03:00
Amnon Heiman
5eba35e439 Passing the metrics nameFactory from Origin
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>
2015-06-11 11:48:36 +03:00
Amnon Heiman
aaae78c2c7 Adding the yammer counter library to pom
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>
2015-06-11 11:32:29 +03:00
Pekka Enberg
16f5f5d07d Merge "Adding the FailureDetectorMBean support"
From Amnon:

  "This series adds the FailureDetectorMBean support to urchin.  After
   this series will be applied, to test use jconsole to connect to the JMX
   API and see the FailureDetectorMBean."
2015-06-04 13:21:03 +03:00
Amnon Heiman
9889727810 Add Failure detector to Main 2015-06-03 19:45:39 +03:00
Amnon Heiman
c671310d0d Adding the FailureDetector MBean support
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>
2015-06-03 19:45:39 +03:00
Pekka Enberg
dbe22715a8 Merge branch "Adding the gossiper MBean implementation"
From Amnon.
2015-06-02 09:19:02 +03:00
Amnon Heiman
8847343ebd Adding the Gossiper MBean implementation
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>
2015-05-25 18:36:12 +03:00
Amnon Heiman
c7aff5bb5f Adding post and parameters support to the API Client
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>
2015-05-25 18:36:05 +03:00
Avi Kivity
088c7c356b Merge commit log API
Amnon says:

"After this patch series, it will be possible to run the JMX API and using
jconsole get the ActiveSegmentName and (the empty) ArchivingSegmentNames."
2015-05-19 18:13:38 +03:00