Commit Graph

38 Commits

Author SHA1 Message Date
Amnon Heiman
62eec8aaf2 Changing the newTimer in APIMetrics to return APITimer
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>
2015-07-14 18:10:53 +03:00
Amnon Heiman
9d143efb07 Adding Timer creation to APIMetricsRegistry
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>
2015-07-14 18:10:53 +03:00
Amnon Heiman
479a0769d1 Clean up the APIMetricsRegistry
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>
2015-07-14 18:10:53 +03:00
Amnon Heiman
2d97995229 Adding the APITimer
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>
2015-07-14 18:10:53 +03:00
Amnon Heiman
e2cdc95b81 APIHistogram: Moving the histogram data collection to the API
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>
2015-07-14 18:10:53 +03:00
Amnon Heiman
e02313923b APIClient add a getJsonObj and getHistogram methods
The getJsonObj returns a json object. The getHistogram returns a
HistogramValue object.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-14 18:10:53 +03:00
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
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
Amnon Heiman
1b36b044fb Instantiating the CompactionManger in Main 2015-07-02 09:23:29 +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
919785bc04 Importing the EstimateHistogram from origin 2015-06-30 18:38:18 +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
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
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
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
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
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
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
9889727810 Add Failure detector to Main 2015-06-03 19:45:39 +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
Amnon Heiman
b11acd15b3 JMX API: Adding getListStrValue to APIClient
This adds support for getting a List of String from the API.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-19 18:01:54 +03:00
Amnon Heiman
b0d8fd0de0 JMX API: Adding the EndpointSnitchInfoMBean stab
This adds a stab to the EndpointSnitchInfoMBean

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-18 15:52:53 +03:00
Amnon Heiman
cd2b174cd3 JMX API: Add the GossiperMBean stab
This adds a stab implementation of the GossiperMBean

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-18 15:33:55 +03:00
Amnon Heiman
24d5d9ea5d JMX API - Adding the CommitLogMBean stab
This holds the stab for the CommitLogMBean.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-18 15:31:14 +03:00
Amnon Heiman
55b80fe541 JMX API rename the cloudius package to cloudius.urchin
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>
2015-05-18 10:27:27 +03:00
Amnon Heiman
5039f0603b Add the MessagingServiceMBean
This is the skeleton implementation for the MessagingService MBean. More
functionality will be add when it will be added to the API.
2015-05-17 17:49:50 +03:00
Amnon Heiman
c64b4b6e56 Adding the StorageServiceMBean stub
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>
2015-05-17 17:48:09 +03:00
Amnon Heiman
77eb357646 APIClient a Json Client Stub
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>
2015-05-17 16:15:17 +03:00
Amnon Heiman
d46a124be3 Adding the MBean Service Support
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>
2015-05-17 15:33:05 +03:00