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 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 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>
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>