Commit Graph

31 Commits

Author SHA1 Message Date
Amnon Heiman
cce767e47e APIClient: getString to return parsed json value
getString should return the string value without the sarounding quotes.

For getRaw was introduce that return the API values in its raw value,
and getString was changed to use the json parser to get the string
values without the quotes.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudus-systems.com>
2015-09-11 09:25:37 +03:00
Pekka Enberg
db6d48a695 Merge "Adding notification for the repair command" from Amnon
"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."
2015-08-31 09:41:01 +03:00
Amnon Heiman
6fc2c5c720 APIClient add postInt
Sometimes a post command need to return, this adds a method to perform a
post command that returns an int value.

The general postGetVal, can be used for other types if needed.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-27 20:46:02 +03:00
Amnon Heiman
bde40aed53 APIClient: Add a getter for estimated histogram buckets
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>
2015-08-24 17:13:34 +03:00
Amnon Heiman
7e7e0ca367 APIClient: Add the getMapInetAddressFloatValue implementation
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>
2015-08-24 13:12:16 +03:00
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
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
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
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
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