Commit Graph

219 Commits

Author SHA1 Message Date
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
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
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
Amnon Heiman
b7e1f5a979 JMX API: Adding the CommitLog implementation
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>
2015-05-19 18:01:54 +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
0ef065ebc7 JMX-API: Fix an endless loop in EndpointSnitchInfo
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>
2015-05-19 18:01:53 +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