You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2013/12/11 18:01:33 UTC
git commit: Re-factored cep artifact names,
parameters and stream definitions
Updated Branches:
refs/heads/master bcf2df898 -> d3c42bf22
Re-factored cep artifact names, parameters and stream definitions
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/d3c42bf2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/d3c42bf2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/d3c42bf2
Branch: refs/heads/master
Commit: d3c42bf22e5c2c840a21e4d7429ee9a1c90c98c8
Parents: bcf2df8
Author: Imesh Gunaratne <im...@apache.org>
Authored: Wed Dec 11 22:31:24 2013 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Wed Dec 11 22:31:24 2013 +0530
----------------------------------------------------------------------
.../apache/stratos/autoscaler/Constants.java | 6 +--
.../WSO2CEPInFlightRequestPublisher.java | 2 +-
.../HealthStatisticsEventBuilder.xml | 4 +-
.../LoadBalancerStatisticsEventBuilder.xml | 4 +-
.../AverageInFlightRequestsEventFormatter.xml | 11 +++++
.../AverageRequestsInflightEventFormatter.xml | 11 -----
.../FaultMessageEventFormatter.xml | 2 +-
.../event-formatters/GradientEventFormatter.xml | 11 -----
.../GradientInFlightRequestsEventFormatter.xml | 11 +++++
.../SecondDerivativeEventFormatter.xml | 11 -----
...DerivativeInFlightRequestsEventFormatter.xml | 11 +++++
.../execution-plans/AverageHeathRequest.xml | 2 +-
.../AverageInFlightRequestsFinder.xml | 19 ++++++++
.../AverageRequestsInflightFinder.xml | 19 --------
.../execution-plans/GradientOfHealthRequest.xml | 2 +-
.../GradientOfRequestsInFlightFinder.xml | 4 +-
.../SecondDerivativeOfHealthRequest.xml | 2 +-
...SecondDerivativeOfRequestsInFlightFinder.xml | 6 +--
.../stream-manager-config.xml | 51 ++++++++++----------
.../agent/health/publisher/HealthPublisher.java | 8 +--
20 files changed, 98 insertions(+), 99 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java
index 7d13eec..2067466 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java
@@ -8,9 +8,9 @@ public class Constants {
public static String ROUND_ROBIN_ALGORITHM_ID = "round-robin";
public static String ONE_AFTER_ANOTHER_ALGORITHM_ID = "one-after-another";
- public static String GRADIENT_OF_REQUESTS_IN_FLIGHT = "gradient_of_requests_in_flight";
- public static String AVERAGE_REQUESTS_IN_FLIGHT = "average_requests_in_flight";
- public static String SECOND_DERIVATIVE_OF_REQUESTS_IN_FLIGHT = "second_derivative_of_requests_in_flight";
+ public static String GRADIENT_OF_REQUESTS_IN_FLIGHT = "gradient_in_flight_requests";
+ public static String AVERAGE_REQUESTS_IN_FLIGHT = "average_in_flight_requests";
+ public static String SECOND_DERIVATIVE_OF_REQUESTS_IN_FLIGHT = "second_derivative_in_flight_requests";
public static String MEMBER_FAULT_EVENT_NAME = "member_fault";
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/statistics/WSO2CEPInFlightRequestPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/statistics/WSO2CEPInFlightRequestPublisher.java b/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/statistics/WSO2CEPInFlightRequestPublisher.java
index b8804d2..6992f45 100644
--- a/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/statistics/WSO2CEPInFlightRequestPublisher.java
+++ b/components/org.apache.stratos.load.balancer.common/src/main/java/org/apache/stratos/load/balancer/common/statistics/WSO2CEPInFlightRequestPublisher.java
@@ -34,7 +34,7 @@ import java.util.List;
*/
public class WSO2CEPInFlightRequestPublisher extends WSO2CEPStatsPublisher {
- private static final String DATA_STREAM_NAME = "stratos.lb.in.flight.req.count";
+ private static final String DATA_STREAM_NAME = "in_flight_requests";
private static final String VERSION = "1.0.0";
private static StreamDefinition createStreamDefinition() {
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/event-builders/HealthStatisticsEventBuilder.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/event-builders/HealthStatisticsEventBuilder.xml b/extensions/cep/artifacts/event-builders/HealthStatisticsEventBuilder.xml
index cff277f..763f7d8 100644
--- a/extensions/cep/artifacts/event-builders/HealthStatisticsEventBuilder.xml
+++ b/extensions/cep/artifacts/event-builders/HealthStatisticsEventBuilder.xml
@@ -2,9 +2,9 @@
<eventBuilder name="HealthStatisticsEventBuilder" statistics="disable"
trace="enable" xmlns="http://wso2.org/carbon/eventbuilder">
<from eventAdaptorName="DefaultWSO2EventInputAdaptor" eventAdaptorType="wso2event">
- <property name="stream">stratos.agent.health.stats</property>
+ <property name="stream">cartridge_agent_health_stats</property>
<property name="version">1.0.0</property>
</from>
<mapping customMapping="disable" type="wso2event"/>
- <to streamName="stratos.agent.health.stats" version="1.0.0"/>
+ <to streamName="cartridge_agent_health_stats" version="1.0.0"/>
</eventBuilder>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/event-builders/LoadBalancerStatisticsEventBuilder.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/event-builders/LoadBalancerStatisticsEventBuilder.xml b/extensions/cep/artifacts/event-builders/LoadBalancerStatisticsEventBuilder.xml
index fd1a707..a3bf644 100644
--- a/extensions/cep/artifacts/event-builders/LoadBalancerStatisticsEventBuilder.xml
+++ b/extensions/cep/artifacts/event-builders/LoadBalancerStatisticsEventBuilder.xml
@@ -2,9 +2,9 @@
<eventBuilder name="LoadBalancerStatisticsEventBuilder"
statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventbuilder">
<from eventAdaptorName="DefaultWSO2EventInputAdaptor" eventAdaptorType="wso2event">
- <property name="stream">stratos.lb.in.flight.req.count</property>
+ <property name="stream">in_flight_requests</property>
<property name="version">1.0.0</property>
</from>
<mapping customMapping="disable" type="wso2event"/>
- <to streamName="stratos.lb.in.flight.req.count" version="1.0.0"/>
+ <to streamName="in_flight_requests" version="1.0.0"/>
</eventBuilder>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/event-formatters/AverageInFlightRequestsEventFormatter.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/event-formatters/AverageInFlightRequestsEventFormatter.xml b/extensions/cep/artifacts/event-formatters/AverageInFlightRequestsEventFormatter.xml
new file mode 100644
index 0000000..b771af3
--- /dev/null
+++ b/extensions/cep/artifacts/event-formatters/AverageInFlightRequestsEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="AverageRequestsInflightEventFormatter"
+ statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="average_in_flight_requests" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"average_in_flight_requests":{"cluster_id":"{{cluster_id}}","partition_id":"{{partition_id}}","value":"{{count}}"}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/event-formatters/AverageRequestsInflightEventFormatter.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/event-formatters/AverageRequestsInflightEventFormatter.xml b/extensions/cep/artifacts/event-formatters/AverageRequestsInflightEventFormatter.xml
deleted file mode 100644
index 19a4f30..0000000
--- a/extensions/cep/artifacts/event-formatters/AverageRequestsInflightEventFormatter.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<eventFormatter name="AverageRequestsInflightEventFormatter"
- statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
- <from streamName="aggregated_requests_stats" version="1.0.0"/>
- <mapping customMapping="enable" type="json">
- <inline>{"average_requests_in_flight":{"cluster_id":"{{cluster_id}}","value":"{{count}}"}}</inline>
- </mapping>
- <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
- <property name="transport.jms.Destination">summarized-health-stats</property>
- </to>
-</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/event-formatters/FaultMessageEventFormatter.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/event-formatters/FaultMessageEventFormatter.xml b/extensions/cep/artifacts/event-formatters/FaultMessageEventFormatter.xml
index 03d7f8f..3904b43 100644
--- a/extensions/cep/artifacts/event-formatters/FaultMessageEventFormatter.xml
+++ b/extensions/cep/artifacts/event-formatters/FaultMessageEventFormatter.xml
@@ -3,7 +3,7 @@
statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
<from streamName="fault_message" version="1.0.0"/>
<mapping customMapping="enable" type="json">
- <inline>{"member_fault":{"member_id":"{{member_id}}", "cluster_id":"{{cluster_id}}"}}</inline>
+ <inline>{"member_fault":{"cluster_id":"{{cluster_id}}","member_id":"{{member_id}}"}}</inline>
</mapping>
<to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
<property name="transport.jms.Destination">summarized-health-stats</property>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/event-formatters/GradientEventFormatter.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/event-formatters/GradientEventFormatter.xml b/extensions/cep/artifacts/event-formatters/GradientEventFormatter.xml
deleted file mode 100644
index e3d9e82..0000000
--- a/extensions/cep/artifacts/event-formatters/GradientEventFormatter.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<eventFormatter name="GradientEventFormatter" statistics="disable"
- trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
- <from streamName="gradient_stats" version="1.0.0"/>
- <mapping customMapping="enable" type="json">
- <inline>{"gradient_of_requests_in_flight":{"cluster_id":"{{cluster_id}}","value":"{{count}}"}}</inline>
- </mapping>
- <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
- <property name="transport.jms.Destination">summarized-health-stats</property>
- </to>
-</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/event-formatters/GradientInFlightRequestsEventFormatter.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/event-formatters/GradientInFlightRequestsEventFormatter.xml b/extensions/cep/artifacts/event-formatters/GradientInFlightRequestsEventFormatter.xml
new file mode 100644
index 0000000..984eee4
--- /dev/null
+++ b/extensions/cep/artifacts/event-formatters/GradientInFlightRequestsEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="GradientInFlightRequestsEventFormatter" statistics="disable"
+ trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="gradient_in_flight_requests" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"gradient_in_flight_requests":{"cluster_id":"{{cluster_id}}","partition_id":"{{partition_id}}","value":"{{count}}"}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/event-formatters/SecondDerivativeEventFormatter.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/event-formatters/SecondDerivativeEventFormatter.xml b/extensions/cep/artifacts/event-formatters/SecondDerivativeEventFormatter.xml
deleted file mode 100644
index ddb1cc4..0000000
--- a/extensions/cep/artifacts/event-formatters/SecondDerivativeEventFormatter.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<eventFormatter name="SecondDerivativeEventFormatter"
- statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
- <from streamName="second_derivative_of_requests_stats" version="1.0.0"/>
- <mapping customMapping="enable" type="json">
- <inline>{"second_derivative_of_requests_in_flight":{"cluster_id":"{{cluster_id}}","value":"{{count}}"}}</inline>
- </mapping>
- <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
- <property name="transport.jms.Destination">summarized-health-stats</property>
- </to>
-</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/event-formatters/SecondDerivativeInFlightRequestsEventFormatter.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/event-formatters/SecondDerivativeInFlightRequestsEventFormatter.xml b/extensions/cep/artifacts/event-formatters/SecondDerivativeInFlightRequestsEventFormatter.xml
new file mode 100644
index 0000000..1d54d03
--- /dev/null
+++ b/extensions/cep/artifacts/event-formatters/SecondDerivativeInFlightRequestsEventFormatter.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eventFormatter name="SecondDerivativeEventFormatter"
+ statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
+ <from streamName="second_derivative_in_flight_requests" version="1.0.0"/>
+ <mapping customMapping="enable" type="json">
+ <inline>{"second_derivative_in_flight_requests":{"cluster_id":"{{cluster_id}}","partition_id":"{{partition_id}}","value":"{{count}}"}}</inline>
+ </mapping>
+ <to eventAdaptorName="JMSOutputAdaptor" eventAdaptorType="jms">
+ <property name="transport.jms.Destination">summarized-health-stats</property>
+ </to>
+</eventFormatter>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/execution-plans/AverageHeathRequest.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/execution-plans/AverageHeathRequest.xml b/extensions/cep/artifacts/execution-plans/AverageHeathRequest.xml
index 75c599d..1a07286 100644
--- a/extensions/cep/artifacts/execution-plans/AverageHeathRequest.xml
+++ b/extensions/cep/artifacts/execution-plans/AverageHeathRequest.xml
@@ -7,7 +7,7 @@
<property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
</siddhiConfiguration>
<importedStreams>
- <stream as="healthStats1" name="stratos.agent.health.stats" version="1.0.0"/>
+ <stream as="healthStats1" name="cartridge_agent_health_stats" version="1.0.0"/>
</importedStreams>
<queryExpressions><![CDATA[from healthStats1 [health_description == 'port_not_open'] select cluster_id,partition_id,member_id group by cluster_id,partition_id insert into fault_message;
from healthStats1 [health_description == 'load_average'] #window.timeBatch(1 min) select cluster_id,partition_id,member_id, avg(value) as average_load_average group by cluster_id,partition_id insert into average_load_average_stats;
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/execution-plans/AverageInFlightRequestsFinder.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/execution-plans/AverageInFlightRequestsFinder.xml b/extensions/cep/artifacts/execution-plans/AverageInFlightRequestsFinder.xml
new file mode 100644
index 0000000..7cb354d
--- /dev/null
+++ b/extensions/cep/artifacts/execution-plans/AverageInFlightRequestsFinder.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<executionPlan name="AverageInFlightRequestsFinder" statistics="disable"
+ trace="enable" xmlns="http://wso2.org/carbon/eventprocessor">
+ <description>This will average the number of requests in flight over a minute.</description>
+ <siddhiConfiguration>
+ <property name="siddhi.enable.distributed.processing">false</property>
+ <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
+ </siddhiConfiguration>
+ <importedStreams>
+ <stream as="lbStats1" name="stratos.lb.stats" version="1.0.0"/>
+ </importedStreams>
+ <queryExpressions><![CDATA[
+from lbStats1#window.timeBatch(1 min)
+select cluster_id,partition_id, avg(in_flight_requests) as count group by cluster_id,partition_id insert into average_in_flight_requests;]]></queryExpressions>
+ <exportedStreams>
+ <stream name="average_in_flight_requests"
+ valueOf="average_in_flight_requests" version="1.0.0"/>
+ </exportedStreams>
+</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/execution-plans/AverageRequestsInflightFinder.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/execution-plans/AverageRequestsInflightFinder.xml b/extensions/cep/artifacts/execution-plans/AverageRequestsInflightFinder.xml
deleted file mode 100644
index 4f72ece..0000000
--- a/extensions/cep/artifacts/execution-plans/AverageRequestsInflightFinder.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<executionPlan name="AverageRequestsInflightFinder" statistics="disable"
- trace="enable" xmlns="http://wso2.org/carbon/eventprocessor">
- <description>This will average the number of requests in flight over a minute.</description>
- <siddhiConfiguration>
- <property name="siddhi.enable.distributed.processing">false</property>
- <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
- </siddhiConfiguration>
- <importedStreams>
- <stream as="lbStats1" name="stratos.lb.stats" version="1.0.0"/>
- </importedStreams>
- <queryExpressions><![CDATA[
-from lbStats1#window.timeBatch(1 min)
-select cluster_id,partition_id, avg(in_flight_requests) as count group by cluster_id,partition_id insert into aggregated_requests_stats;]]></queryExpressions>
- <exportedStreams>
- <stream name="aggregated_requests_stats"
- valueOf="aggregated_requests_stats" version="1.0.0"/>
- </exportedStreams>
-</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/execution-plans/GradientOfHealthRequest.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/execution-plans/GradientOfHealthRequest.xml b/extensions/cep/artifacts/execution-plans/GradientOfHealthRequest.xml
index a286c12..cc024ea 100644
--- a/extensions/cep/artifacts/execution-plans/GradientOfHealthRequest.xml
+++ b/extensions/cep/artifacts/execution-plans/GradientOfHealthRequest.xml
@@ -7,7 +7,7 @@
<property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
</siddhiConfiguration>
<importedStreams>
- <stream as="healthStats2" name="stratos.agent.health.stats" version="1.0.0"/>
+ <stream as="healthStats2" name="cartridge_agent_health_stats" version="1.0.0"/>
</importedStreams>
<queryExpressions><![CDATA[
from healthStats2 #window.stratos:faultHandling(1min, member_id) select cluster_id,partition_id,member_id group by cluster_id,partition_id insert into fault_message;
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/execution-plans/GradientOfRequestsInFlightFinder.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/execution-plans/GradientOfRequestsInFlightFinder.xml b/extensions/cep/artifacts/execution-plans/GradientOfRequestsInFlightFinder.xml
index 27286fe..af1020a 100644
--- a/extensions/cep/artifacts/execution-plans/GradientOfRequestsInFlightFinder.xml
+++ b/extensions/cep/artifacts/execution-plans/GradientOfRequestsInFlightFinder.xml
@@ -11,8 +11,8 @@
</importedStreams>
<queryExpressions><![CDATA[
from lbStats2#window.stratos:gradient(1 min, in_flight_requests)
-select cluster_id,partition_id,in_flight_requests as count group by cluster_id,partition_id insert into gradient_stats;]]></queryExpressions>
+select cluster_id,partition_id,in_flight_requests as count group by cluster_id,partition_id insert into gradient_in_flight_requests;]]></queryExpressions>
<exportedStreams>
- <stream name="gradient_stats" valueOf="gradient_stats" version="1.0.0"/>
+ <stream name="gradient_in_flight_requests" valueOf="gradient_in_flight_requests" version="1.0.0"/>
</exportedStreams>
</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/execution-plans/SecondDerivativeOfHealthRequest.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/execution-plans/SecondDerivativeOfHealthRequest.xml b/extensions/cep/artifacts/execution-plans/SecondDerivativeOfHealthRequest.xml
index f059c8a..0878d37 100644
--- a/extensions/cep/artifacts/execution-plans/SecondDerivativeOfHealthRequest.xml
+++ b/extensions/cep/artifacts/execution-plans/SecondDerivativeOfHealthRequest.xml
@@ -7,7 +7,7 @@
<property name="siddhi.persistence.snapshot.time.interval.minutes">0</property>
</siddhiConfiguration>
<importedStreams>
- <stream as="healthStats3" name="stratos.agent.health.stats" version="1.0.0"/>
+ <stream as="healthStats3" name="cartridge_agent_health_stats" version="1.0.0"/>
</importedStreams>
<queryExpressions><![CDATA[
from healthStats3 [health_description == 'memory_consumption'] #window.stratos:secondDerivative(1 min, value) select cluster_id,partition_id,member_id, value as second_derivative_memory_consumption group by cluster_id,partition_id insert into second_derivative_memory_consumption_stats;
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/execution-plans/SecondDerivativeOfRequestsInFlightFinder.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/execution-plans/SecondDerivativeOfRequestsInFlightFinder.xml b/extensions/cep/artifacts/execution-plans/SecondDerivativeOfRequestsInFlightFinder.xml
index 80863b0..6047f27 100644
--- a/extensions/cep/artifacts/execution-plans/SecondDerivativeOfRequestsInFlightFinder.xml
+++ b/extensions/cep/artifacts/execution-plans/SecondDerivativeOfRequestsInFlightFinder.xml
@@ -11,9 +11,9 @@
</importedStreams>
<queryExpressions><![CDATA[
from lbStats3#window.stratos:secondDerivative(1 min, in_flight_requests)
-select cluster_id,partition_id,in_flight_requests as count group by cluster_id,partition_id insert into second_derivative_of_requests_stats;]]></queryExpressions>
+select cluster_id,partition_id,in_flight_requests as count group by cluster_id,partition_id insert into second_derivative_in_flight_requests;]]></queryExpressions>
<exportedStreams>
- <stream name="second_derivative_of_requests_stats"
- valueOf="second_derivative_of_requests_stats" version="1.0.0"/>
+ <stream name="second_derivative_in_flight_requests"
+ valueOf="second_derivative_in_flight_requests" version="1.0.0"/>
</exportedStreams>
</executionPlan>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/extensions/cep/artifacts/stream-definitions/stream-manager-config.xml
----------------------------------------------------------------------
diff --git a/extensions/cep/artifacts/stream-definitions/stream-manager-config.xml b/extensions/cep/artifacts/stream-definitions/stream-manager-config.xml
index d5ce719..fb467fe 100755
--- a/extensions/cep/artifacts/stream-definitions/stream-manager-config.xml
+++ b/extensions/cep/artifacts/stream-definitions/stream-manager-config.xml
@@ -1,8 +1,8 @@
<streamManagerConfiguration xmlns="http://wso2.org/carbon/streammanager">
-
- <streamDefinition name="stratos.lb.in.flight.req.count" version="1.0.0">
- <description>cluster partition in-flight request count</description>
- <nickName>in-flight request count</nickName>
+ <!-- in-flight requests stream definitions start -->
+ <streamDefinition name="in_flight_requests" version="1.0.0">
+ <description>in-flight request count</description>
+ <nickName>in-flight requests</nickName>
<metaData>
</metaData>
<correlationData>
@@ -14,51 +14,51 @@
</payloadData>
</streamDefinition>
- <streamDefinition name="gradient_stats" version="1.0.0">
- <description>gradient stats</description>
- <nickName>gradient stats</nickName>
+ <streamDefinition name="gradient_in_flight_requests" version="1.0.0">
+ <description>gradient of in flight request count</description>
+ <nickName>gradient in flight requests</nickName>
<metaData>
</metaData>
<correlationData>
</correlationData>
<payloadData>
- <property name="partition_id" type="String"/>
<property name="cluster_id" type="String"/>
+ <property name="partition_id" type="String"/>
<property name="count" type="double"/>
</payloadData>
</streamDefinition>
- <streamDefinition name="aggregated_requests_stats" version="1.0.0">
- <description>aggregated requests stats</description>
- <nickName>aggregated requests stats</nickName>
+ <streamDefinition name="average_in_flight_requests" version="1.0.0">
+ <description>average of in-flight request count</description>
+ <nickName>average in-flight requests</nickName>
<metaData>
</metaData>
<correlationData>
</correlationData>
<payloadData>
- <property name="partition_id" type="String"/>
<property name="cluster_id" type="String"/>
+ <property name="partition_id" type="String"/>
<property name="count" type="double"/>
</payloadData>
</streamDefinition>
- <streamDefinition name="second_derivative_of_requests_stats" version="1.0.0">
- <description>second derivative of requests stats</description>
- <nickName>second derivative of requests stats</nickName>
+ <streamDefinition name="second_derivative_in_flight_requests" version="1.0.0">
+ <description>second derivative of in-flight request count</description>
+ <nickName>second derivative in-flight requests</nickName>
<metaData>
</metaData>
<correlationData>
</correlationData>
<payloadData>
- <property name="partition_id" type="String"/>
<property name="cluster_id" type="String"/>
+ <property name="partition_id" type="String"/>
<property name="count" type="double"/>
</payloadData>
- </streamDefinition>
+ </streamDefinition>
+ <!-- in-flight requests stream definitions end -->
- <!-- This section is for health stat -->
-
- <streamDefinition name="stratos.agent.health.stats" version="1.0.0">
+ <!-- cartridge agent health stats stream definitions start -->
+ <streamDefinition name="cartridge_agent_health_stats" version="1.0.0">
<description>agent health stats</description>
<nickName>agent health stats</nickName>
<metaData>
@@ -66,11 +66,11 @@
<correlationData>
</correlationData>
<payloadData>
+ <property name="cluster_id" type="String" />
+ <property name="partition_id" type="String"/>
+ <property name="member_id" type="String" />
<property name="health_description" type="String"/>
<property name="value" type="double"/>
- <property name="member_id" type="String" />
- <property name="cluster_id" type="String" />
- <property name="partition_id" type="String"/>
</payloadData>
</streamDefinition>
@@ -175,8 +175,7 @@
<property name="cluster_id" type="String"/>
<property name="partition_id" type="String"/>
<property name="member_id" type="String"/>
- <property name="cluster_id" type="String" />
</payloadData>
- </streamDefinition>
-
+ </streamDefinition>
+ <!-- cartridge agent health stats stream definitions end -->
</streamManagerConfiguration>
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/d3c42bf2/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisher.java
----------------------------------------------------------------------
diff --git a/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisher.java b/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisher.java
index a273f57..b9f1258 100644
--- a/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisher.java
+++ b/products/cartridge-agent/modules/health-stats/src/main/java/org/apache/stratos/cartridge/agent/health/publisher/HealthPublisher.java
@@ -35,7 +35,7 @@ import java.util.Observer;
public class HealthPublisher implements Observer {
private static final Log log = LogFactory.getLog(HealthPublisher.class);
- private static final String CALL_CENTER_DATA_STREAM = "stratos.agent.health.stats";
+ private static final String DATA_STREAM_NAME = "cartridge_agent_health_stats";
private static final String VERSION = "1.0.0";
private AsyncDataPublisher asyncDataPublisher;
@@ -57,7 +57,7 @@ public class HealthPublisher implements Observer {
//Using Asynchronous data publisher
asyncDataPublisher = new AsyncDataPublisher("tcp://" + ip + ":" + port + "", "admin", "admin", agent);
String streamDefinition = "{" +
- " 'name':'" + CALL_CENTER_DATA_STREAM + "'," +
+ " 'name':'" + DATA_STREAM_NAME + "'," +
" 'version':'" + VERSION + "'," +
" 'nickName': 'health stats'," +
" 'description': 'health stats'," +
@@ -70,7 +70,7 @@ public class HealthPublisher implements Observer {
" {'name':'partition_id','type':'STRING'}" +
" ]" +
"}";
- asyncDataPublisher.addStreamDefinition(streamDefinition, CALL_CENTER_DATA_STREAM, VERSION);
+ asyncDataPublisher.addStreamDefinition(streamDefinition, DATA_STREAM_NAME, VERSION);
} catch (NullPointerException e) {
if (log.isErrorEnabled()) {
@@ -104,7 +104,7 @@ public class HealthPublisher implements Observer {
Object[] payload = new Object[]{entry.getKey(), entry.getValue(), memberID, clusterID,partitionId};
Event event = eventObject(null, null, payload, new HashMap<String, String>());
try {
- asyncDataPublisher.publish(CALL_CENTER_DATA_STREAM, VERSION, event);
+ asyncDataPublisher.publish(DATA_STREAM_NAME, VERSION, event);
} catch (AgentException e) {
log.error("Failed to publish health stats. ", e);
}