Removed tenantId from queries and refactore jaggery files

Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9c1fdc75
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9c1fdc75
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9c1fdc75

Branch: refs/heads/stratos-4.1.x
Commit: 9c1fdc7532c4f36e6e88c2c1d083f782f9a9f2e6
Parents: b38e27c
Author: Thanuja <[email protected]>
Authored: Tue Sep 22 23:46:06 2015 +0530
Committer: Imesh Gunaratne <[email protected]>
Committed: Mon Sep 28 18:44:17 2015 +0530

----------------------------------------------------------------------
 extensions/das/README.md                        |    10 +
 extensions/das/metering-service/capps/README.md |     5 +
 extensions/das/metering-service/capps/build.xml |    45 +
 .../capps/jaggery-files/applications.jag        |    42 +
 .../capps/jaggery-files/clusters.jag            |    43 +
 .../capps/jaggery-files/member-count.jag        |    99 +
 .../capps/jaggery-files/member-info.jag         |    71 +
 .../capps/jaggery-files/member-status.jag       |    91 +
 .../capps/jaggery-files/schema.jag              |    64 +
 .../das/metering-service/capps/mysqlscript.sql  |     4 +
 extensions/das/metering-service/capps/pom.xml   |    72 +
 .../Dashboard/artifact.xml                      |    24 +
 .../Dashboard/stratos-metering-dashboard.json   |   267 +
 .../MemberInfoEventReceiver.xml                 |    29 +
 .../EventReceiver_MemberInfo/artifact.xml       |    24 +
 .../MemberLifecycleEventReceiver.xml            |    29 +
 .../EventReceiver_MemberLifecycle/artifact.xml  |    24 +
 .../ScalingDecisionEventReceiver.xml            |    29 +
 .../EventReceiver_ScalingDecision/artifact.xml  |    24 +
 .../EventStore_MemberInfo/artifact.xml          |    24 +
 .../EventStore_MemberInfo/member_info.xml       |   148 +
 .../EventStore_MemberLifecycle/artifact.xml     |    24 +
 .../member_lifecycle.xml                        |    99 +
 .../EventStore_ScalingDecision/artifact.xml     |    24 +
 .../scaling_decision.xml                        |   155 +
 .../EventStream_MemberInfo/artifact.xml         |    24 +
 .../member_info_1.0.0.json                      |    76 +
 .../EventStream_MemberLifecycle/artifact.xml    |    24 +
 .../member_lifecycle_1.0.0.json                 |    48 +
 .../EventStream_ScalingDecision/artifact.xml    |    24 +
 .../scaling_decision_1.0.0.json                 |    80 +
 .../Member_Count/css/bootstrap.min.css          |  5935 ++++++
 .../Member_Count/css/d3.geomap.css              |    34 +
 .../Member_Count/css/igviz.css                  |    86 +
 .../Member_Count/gadget.json                    |    19 +
 .../Gadget_Member_Count/Member_Count/index.xml  |    85 +
 .../js/d3.geomap.dependencies.min.js            |  8235 ++++++++
 .../Member_Count/js/d3.geomap.min.js            |   524 +
 .../Member_Count/js/d3.min.js                   |  6312 +++++++
 .../Member_Count/js/excanvas.min.js             |   934 +
 .../Member_Count/js/gadgetconf.js               |    56 +
 .../Member_Count/js/igviz.js                    |  3545 ++++
 .../Member_Count/js/jquery.js                   |  9496 ++++++++++
 .../Gadget_Member_Count/Member_Count/js/main.js |   167 +
 .../Member_Count/js/outputAdapterUiLibrary.js   |   275 +
 .../Gadget_Member_Count/Member_Count/js/vega.js |  7986 ++++++++
 .../Gadget_Member_Count/artifact.xml            |    24 +
 .../Member_Details_Filter/css/bootstrap.min.css |  5935 ++++++
 .../Member_Details_Filter/css/jquery-ui.css     |  1225 ++
 .../Member_Details_Filter/css/style.css         |   221 +
 .../Member_Details_Filter/gadget.json           |    23 +
 .../Member_Details_Filter/index.png             |   Bin 0 -> 6754 bytes
 .../Member_Details_Filter/index.xml             |    67 +
 .../Member_Details_Filter/js/jquery-ui.js       | 16617 +++++++++++++++++
 .../js/member-details-filter.js                 |   113 +
 .../Gadget_Member_Details_Filter/artifact.xml   |    24 +
 .../Member_Information/css/bootstrap.min.css    |  5935 ++++++
 .../Member_Information/css/d3.geomap.css        |    34 +
 .../Member_Information/css/igviz.css            |    66 +
 .../Member_Information/gadget.json              |    19 +
 .../Member_Information/index.xml                |    88 +
 .../js/d3.geomap.dependencies.min.js            |  8235 ++++++++
 .../Member_Information/js/d3.geomap.min.js      |   524 +
 .../Member_Information/js/d3.min.js             |  6312 +++++++
 .../Member_Information/js/excanvas.min.js       |   934 +
 .../Member_Information/js/gadgetconf.js         |    78 +
 .../Member_Information/js/igviz.js              |  3545 ++++
 .../Member_Information/js/jquery.js             |  9496 ++++++++++
 .../Member_Information/js/main.js               |   163 +
 .../js/outputAdapterUiLibrary.js                |   276 +
 .../Member_Information/js/vega.js               |  7986 ++++++++
 .../Gadget_Member_Information/artifact.xml      |    24 +
 .../Member_Status/css/bootstrap.min.css         |  5935 ++++++
 .../Member_Status/css/d3.geomap.css             |    34 +
 .../Member_Status/css/igviz.css                 |    66 +
 .../Member_Status/gadget.json                   |    19 +
 .../Member_Status/index.xml                     |    87 +
 .../js/d3.geomap.dependencies.min.js            |  8235 ++++++++
 .../Member_Status/js/d3.geomap.min.js           |   524 +
 .../Member_Status/js/d3.min.js                  |  6312 +++++++
 .../Member_Status/js/excanvas.min.js            |   934 +
 .../Member_Status/js/gadgetconf.js              |    47 +
 .../Member_Status/js/igviz.js                   |  3545 ++++
 .../Member_Status/js/jquery.js                  |  9496 ++++++++++
 .../Member_Status/js/main.js                    |   165 +
 .../Member_Status/js/outputAdapterUiLibrary.js  |   276 +
 .../Member_Status/js/vega.js                    |  7986 ++++++++
 .../Gadget_Member_Status/artifact.xml           |    24 +
 .../Member_Status_Filter/css/bootstrap.min.css  |  5935 ++++++
 .../Member_Status_Filter/css/jquery-ui.css      |  1225 ++
 .../Member_Status_Filter/css/style.css          |   253 +
 .../Member_Status_Filter/gadget.json            |    23 +
 .../Member_Status_Filter/index.png              |   Bin 0 -> 12554 bytes
 .../Member_Status_Filter/index.xml              |    52 +
 .../Member_Status_Filter/js/jquery-ui.js        | 16617 +++++++++++++++++
 .../js/member-status-filter.js                  |   142 +
 .../Gadget_Member_Status_Filter/artifacts.xml   |    24 +
 .../Layout/artifact.xml                         |    24 +
 .../Layout/single-column/index.hbs              |    27 +
 .../Layout/single-column/index.jpg              |   Bin 0 -> 1270 bytes
 .../Layout/single-column/index.png              |   Bin 0 -> 4958 bytes
 .../Layout/single-column/layout.json            |     8 +
 .../SaprkScript_ScalingDecision/artifact.xml    |    24 +
 .../scaling_details.xml                         |    39 +
 .../SparkScript_MemberInfo/artifact.xml         |    24 +
 .../member_information.xml                      |    36 +
 .../SparkScript_MemberLifecycle/artifact.xml    |    24 +
 .../member_count.xml                            |    55 +
 .../stratos-metering-service/artifacts.xml      |    56 +
 extensions/das/metering-service/pom.xml         |    38 +
 .../das/metering-service/spark-udfs/README.md   |     6 +
 .../das/metering-service/spark-udfs/pom.xml     |    40 +
 .../spark-udfs/spark-time-udf/pom.xml           |    37 +
 .../das/extension/spark/udf/TimeUDF.java        |    49 +
 extensions/das/pom.xml                          |    39 +
 extensions/pom.xml                              |     1 +
 116 files changed, 181882 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/README.md
----------------------------------------------------------------------
diff --git a/extensions/das/README.md b/extensions/das/README.md
new file mode 100644
index 0000000..00be297
--- /dev/null
+++ b/extensions/das/README.md
@@ -0,0 +1,10 @@
+# Apache Stratos DAS Extensions
+
+Apache Stratos Data Analytics Server (DAS) extensions include DAS artifacts 
and spark udf to run spark script.
+These extensions need to be deployed manually when running DAS externally.
+
+Please refer below link for more information on WSO2 DAS.
+https://docs.wso2.com/display/DAS300/WSO2+Data+Analytics+Server+Documentation
+
+Thank you for using Apache Stratos!
+The Stratos Team
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/README.md
----------------------------------------------------------------------
diff --git a/extensions/das/metering-service/capps/README.md 
b/extensions/das/metering-service/capps/README.md
new file mode 100644
index 0000000..47adc9a
--- /dev/null
+++ b/extensions/das/metering-service/capps/README.md
@@ -0,0 +1,5 @@
+This directory contains Composite Applications (CApps) required for Stratos 
Metering Service. It includes all Event Stream, Event receiver, Even Store, 
Gadgets and Dashboard artifacts bundle inside the car file.
+Follow the below steps to generate the metering dashboard:
+1. Add the jaggery files which can be found inside directory 'JaggeryFiles' to 
inside server path '/jaggeryapps/portal/controllers/apis'
+2. Create MySQL data tables using queries in 'mysqlscript.txt'
+3. Add the car file to server to generate the metering dashboard.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/build.xml
----------------------------------------------------------------------
diff --git a/extensions/das/metering-service/capps/build.xml 
b/extensions/das/metering-service/capps/build.xml
new file mode 100644
index 0000000..b1b43d8
--- /dev/null
+++ b/extensions/das/metering-service/capps/build.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project name="stratos-metering-service" default="zip" basedir=".">
+
+    <property name="project-name" value="${ant.project.name}"/>
+    <property name="target-dir" value="target"/>
+
+    <property name="stratos_metering_service_dir" 
value="stratos-metering-service"/>
+
+    <target name="clean">
+        <delete dir="${target-dir}"/>
+    </target>
+
+    <target name="pre-configure">
+        <mkdir dir="${target-dir}"/>
+        <copy file="README.md" todir="${target-dir}"/>
+    </target>
+
+    <target name="zip" depends="clean,pre-configure">
+        <zip destfile="${target-dir}/${stratos_metering_service_dir}.car">
+            <zipfileset dir="${stratos_metering_service_dir}"/>
+        </zip>
+    </target>
+
+</project>
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/jaggery-files/applications.jag
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/jaggery-files/applications.jag 
b/extensions/das/metering-service/capps/jaggery-files/applications.jag
new file mode 100644
index 0000000..727d06a
--- /dev/null
+++ b/extensions/das/metering-service/capps/jaggery-files/applications.jag
@@ -0,0 +1,42 @@
+<%
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+(function () {
+    var log = new Log();
+    var HTTP_INTERNAL_ERROR = 500;
+
+    var db = new Database("WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB");
+
+    try {
+        var result = db.query("SELECT DISTINCT ApplicationId FROM 
MEMBER_COUNT");
+
+        if (result != null) {
+            print(result);
+        }
+    }
+    catch (e) {
+        print(e.toString());
+    }
+    finally {
+        db.close();
+    }
+}());
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/jaggery-files/clusters.jag
----------------------------------------------------------------------
diff --git a/extensions/das/metering-service/capps/jaggery-files/clusters.jag 
b/extensions/das/metering-service/capps/jaggery-files/clusters.jag
new file mode 100644
index 0000000..c404872
--- /dev/null
+++ b/extensions/das/metering-service/capps/jaggery-files/clusters.jag
@@ -0,0 +1,43 @@
+<%
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+(function () {
+    var log = new Log();
+    var HTTP_INTERNAL_ERROR = 500;
+
+    var db = new Database("WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB");
+
+    try {
+        var applicationId = request.getParameter('applicationId');
+        var result = db.query("SELECT DISTINCT ClusterAlias, ClusterId FROM 
MEMBER_COUNT WHERE ApplicationId ='" + applicationId + "'");
+
+        if (result != null) {
+            print(result);
+        }
+    }
+    catch (e) {
+        print(e.toString());
+    }
+    finally {
+        db.close();
+    }
+}());
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/jaggery-files/member-count.jag
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/jaggery-files/member-count.jag 
b/extensions/das/metering-service/capps/jaggery-files/member-count.jag
new file mode 100644
index 0000000..ba6bdc8
--- /dev/null
+++ b/extensions/das/metering-service/capps/jaggery-files/member-count.jag
@@ -0,0 +1,99 @@
+<%
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+(function () {
+    var log = new Log();
+    var TABLE_NAME = "tableName";
+
+    var HTTP_INTERNAL_ERROR = 500;
+
+    var carbon = require('carbon');
+    var configs = require('/configs/designer.json');
+
+    var tableName = request.getParameter(TABLE_NAME);
+    if (tableName == null) {
+        log.error("Table name param is not provided!");
+        response.status = HTTP_INTERNAL_ERROR;
+        print('{ "status": "Failed", "message": "Table name param is empty" 
}');
+        return;
+    }
+
+    var TIME_INTERVAL_1 = '30 Min';
+    var TIME_INTERVAL_2 = '1 Hour';
+    var TIME_INTERVAL_3 = '1 Day';
+    var TIME_INTERVAL_4 = '1 Week';
+    var TIME_INTERVAL_5 = '1 Month';
+    var ALL_CLUSTERS = 'All Clusters';
+
+    var carbon = require('carbon');
+    var configs = require('/configs/designer.json');
+    var content = request.getContent();
+    var contentAsString = null;
+    if (content != '' && content != null) {
+        contentAsString = stringify(content);
+        if (log.isDebugEnabled()) {
+            log.debug("Value of content: " + contentAsString);
+        }
+    }
+
+    var db = new Database("WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB");
+
+    try {
+        var result;
+
+        var timeInterval = request.getParameter("time");
+        var interval = 1800000;
+        var x_axis_interval;
+        if (timeInterval === TIME_INTERVAL_1) {
+            interval = 1800000;
+            x_axis_interval = 60;
+        } else if (timeInterval === TIME_INTERVAL_2) {
+            interval = 3600000;
+            x_axis_interval = 120;
+        } else if (timeInterval === TIME_INTERVAL_3) {
+            interval = 86400000;
+            x_axis_interval = 480;
+        } else if (timeInterval === TIME_INTERVAL_4) {
+            interval = 604800000;
+            x_axis_interval = 3360;
+        } else if (timeInterval === TIME_INTERVAL_5) {
+            interval = 2419200000;
+            x_axis_interval = 13440;
+        }
+        var applicationId = request.getParameter("applicationId");
+        var clusterId = request.getParameter("clusterId");
+
+        if (clusterId == ALL_CLUSTERS) {
+            result = db.query("SELECT FROM_UNIXTIME(CEILING( Time/('" + 
x_axis_interval + "'*1000)) *'" + x_axis_interval + "', '%Y:%m:%d %h:%i') AS 
Time, SUM(CreatedInstanceCount) AS CreatedInstanceCount , 
SUM(InitializedInstanceCount) AS InitializedInstanceCount , 
SUM(ActiveInstanceCount) AS ActiveInstanceCount, SUM(TerminatedInstanceCount) 
AS TerminatedInstanceCount FROM " + tableName + " WHERE ApplicationId='" + 
applicationId + "' AND Time > ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000-'" + 
interval + "' ) AND Time <= ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000) GROUP BY 
FROM_UNIXTIME( CEILING( Time/('" + x_axis_interval + "'*1000)) 
*'"+x_axis_interval+"', '%Y:%m:%d %h:%i'), ApplicationId");
+        }else{
+            result = db.query("SELECT FROM_UNIXTIME(CEILING( Time/('" + 
x_axis_interval + "'*1000)) *'"+x_axis_interval+"', '%Y:%m:%d %h:%i') AS Time, 
SUM(CreatedInstanceCount) AS CreatedInstanceCount , 
SUM(InitializedInstanceCount) AS InitializedInstanceCount , 
SUM(ActiveInstanceCount) AS ActiveInstanceCount, SUM(TerminatedInstanceCount) 
AS TerminatedInstanceCount FROM " + tableName + " WHERE ApplicationId='" + 
applicationId + "' AND ClusterId='" + clusterId + "' AND Time > 
ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000-'" + interval + "' ) AND Time <= 
ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000) GROUP BY FROM_UNIXTIME( CEILING( 
Time/('" + x_axis_interval + "'*1000)) *'"+x_axis_interval+"', '%Y:%m:%d 
%h:%i')");
+        }
+        print(result);
+
+    }
+    catch (e) {
+        print(e.toString());
+    }
+    finally {
+        db.close();
+    }
+}());
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/jaggery-files/member-info.jag
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/jaggery-files/member-info.jag 
b/extensions/das/metering-service/capps/jaggery-files/member-info.jag
new file mode 100644
index 0000000..3325ca7
--- /dev/null
+++ b/extensions/das/metering-service/capps/jaggery-files/member-info.jag
@@ -0,0 +1,71 @@
+<%
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+(function () {
+    var log = new Log();
+    var TABLE_NAME = "tableName";
+
+    var HTTP_INTERNAL_ERROR = 500;
+
+    var carbon = require('carbon');
+    var configs = require('/configs/designer.json');
+
+    var tableName = request.getParameter(TABLE_NAME);
+    if (tableName == null) {
+        log.error("Table name param is not provided!");
+        response.status = HTTP_INTERNAL_ERROR;
+        print('{ "status": "Failed", "message": "Table name param is empty" 
}');
+        return;
+    }
+
+    var ALL_CLUSTERS = 'All Clusters';
+
+    var content = request.getContent();
+    var contentAsString = null;
+    if (content != '' && content != null) {
+        contentAsString = stringify(content);
+        if (log.isDebugEnabled()) {
+            log.debug("Value of content: " + contentAsString);
+        }
+    }
+
+    var db = new Database("WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB");
+
+    try {
+        var result;
+        var applicationId = request.getParameter("applicationId");
+        var clusterId = request.getParameter("clusterId");
+
+        if (clusterId == ALL_CLUSTERS) {
+            result = db.query("SELECT * FROM " + tableName + " WHERE MemberId 
IN (SELECT DISTINCT MemberId FROM ANALYTICS_PROCESSED_DATA_STORE.MEMBER_STATUS 
WHERE ApplicationId='" + applicationId + "')");
+        } else {
+            result = db.query("SELECT * FROM " + tableName + " WHERE MemberId 
IN (SELECT DISTINCT MemberId FROM ANALYTICS_PROCESSED_DATA_STORE.MEMBER_STATUS 
WHERE ApplicationId='" + applicationId + "' AND ClusterId='" + clusterId + 
"')");
+        }
+        print(result);
+    }
+    catch (e) {
+        print(e.toString());
+    }
+    finally {
+        db.close();
+    }
+}());
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/jaggery-files/member-status.jag
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/jaggery-files/member-status.jag 
b/extensions/das/metering-service/capps/jaggery-files/member-status.jag
new file mode 100644
index 0000000..02254ec
--- /dev/null
+++ b/extensions/das/metering-service/capps/jaggery-files/member-status.jag
@@ -0,0 +1,91 @@
+<%
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+(function () {
+    var log = new Log();
+
+    var TABLE_NAME = "tableName";
+
+    var HTTP_INTERNAL_ERROR = 500;
+
+    var TIME_INTERVAL_1 = '30 Min';
+    var TIME_INTERVAL_2 = '1 Hour';
+    var TIME_INTERVAL_3 = '1 Day';
+    var TIME_INTERVAL_4 = '1 Week';
+    var TIME_INTERVAL_5 = '1 Month';
+    var ALL_CLUSTERS = 'All Clusters';
+
+    var carbon = require('carbon');
+    var configs = require('/configs/designer.json');
+
+    var tableName = request.getParameter(TABLE_NAME);
+    if (tableName == null) {
+        log.error("Table name param is not provided!");
+        response.status = HTTP_INTERNAL_ERROR;
+        print('{ "status": "Failed", "message": "Table name param is empty" 
}');
+        return;
+    }
+
+    var content = request.getContent();
+    var contentAsString = null;
+    if (content != '' && content != null) {
+        contentAsString = stringify(content);
+        if (log.isDebugEnabled()) {
+            log.debug("Value of content: " + contentAsString);
+        }
+    }
+
+    var db = new Database("WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB");
+
+    try {
+        var result;
+
+        var timeInterval = request.getParameter("time");
+        var interval = 1800000;
+        if (timeInterval === TIME_INTERVAL_1) {
+            interval = 1800000;
+        } else if (timeInterval === TIME_INTERVAL_2) {
+            interval = 3600000;
+        } else if (timeInterval === TIME_INTERVAL_3) {
+            interval = 86400000;
+        } else if (timeInterval === TIME_INTERVAL_4) {
+            interval = 604800000;
+        } else if (timeInterval === TIME_INTERVAL_5) {
+            interval = 2419200000;
+        }
+        var applicationId = request.getParameter("applicationId");
+        var clusterId = request.getParameter("clusterId");
+
+        if (clusterId == ALL_CLUSTERS) {
+            result = db.query("SELECT FROM_UNIXTIME(Time/1000, '%Y:%m:%d 
%h:%i:%s') AS Time, MemberId, MemberStatus FROM " + tableName + " WHERE 
ApplicationId='" + applicationId + "' AND Time > 
ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000-'" + interval + "' ) AND Time <= 
ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000)");
+        }else {
+            result = db.query("SELECT FROM_UNIXTIME(Time/1000, '%Y:%m:%d 
%h:%i:%s') AS Time, MemberId, MemberStatus FROM " + tableName + " WHERE 
ApplicationId='" + applicationId + "' AND ClusterId='" + clusterId + "' AND 
Time > ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000-'" + interval + "' ) AND Time <= 
ROUND(UNIX_TIMESTAMP(CURTIME(4)) * 1000)");
+        }
+        print(result);
+    }
+    catch (e) {
+        print(e.toString());
+    }
+    finally {
+        db.close();
+    }
+}());
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/jaggery-files/schema.jag
----------------------------------------------------------------------
diff --git a/extensions/das/metering-service/capps/jaggery-files/schema.jag 
b/extensions/das/metering-service/capps/jaggery-files/schema.jag
new file mode 100644
index 0000000..29c0ca7
--- /dev/null
+++ b/extensions/das/metering-service/capps/jaggery-files/schema.jag
@@ -0,0 +1,64 @@
+<%
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+(function () {
+    var log = new Log();
+
+    var TABLE_NAME = "tableName";
+
+    var HTTP_INTERNAL_ERROR = 500;
+
+    var carbon = require('carbon');
+    var configs = require('/configs/designer.json');
+
+    var tableName = request.getParameter(TABLE_NAME);
+    if (tableName == null) {
+        log.error("Table name param is not provided!");
+        response.status = HTTP_INTERNAL_ERROR;
+        print('{ "status": "Failed", "message": "Table name param is empty" 
}');
+        return;
+    }
+
+    var content = request.getContent();
+    var contentAsString = null;
+    if (content != '' && content != null) {
+        contentAsString = stringify(content);
+        if (log.isDebugEnabled()) {
+            log.debug("Value of content: " + contentAsString);
+        }
+    }
+
+    var db = new Database("WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB");
+
+    try {
+        var result = db.query("SELECT COLUMN_NAME,DATA_TYPE FROM 
INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='ANALYTICS_PROCESSED_DATA_STORE' 
AND TABLE_NAME = '" + tableName + "'");
+        if (result != null) {
+            print(result);
+        }
+    }
+    catch (e) {
+        print(e.toString());
+    }
+    finally {
+        db.close();
+    }
+}());
+%>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/mysqlscript.sql
----------------------------------------------------------------------
diff --git a/extensions/das/metering-service/capps/mysqlscript.sql 
b/extensions/das/metering-service/capps/mysqlscript.sql
new file mode 100644
index 0000000..76d6409
--- /dev/null
+++ b/extensions/das/metering-service/capps/mysqlscript.sql
@@ -0,0 +1,4 @@
+CREATE TABLE ANALYTICS_PROCESSED_DATA_STORE.MEMBER_STATUS(TenantId int, Time 
long, ApplicationId VARCHAR(150), ClusterId VARCHAR(150), MemberId 
VARCHAR(150), MemberStatus VARCHAR(50));
+CREATE TABLE ANALYTICS_PROCESSED_DATA_STORE.MEMBER_COUNT(Time long, 
ApplicationId VARCHAR(150), ClusterId VARCHAR(150), ClusterAlias VARCHAR(150), 
CreatedInstanceCount int, InitializedInstanceCount int, ActiveInstanceCount 
int, TerminatedInstanceCount int);
+CREATE TABLE ANALYTICS_PROCESSED_DATA_STORE.SCALING_DETAILS(Time VARCHAR(50), 
ScalingDecisionId VARCHAR(150), ClusterId VARCHAR(150), MinInstanceCount INT, 
MaxInstanceCount INT, RIFPredicted INT, RIFThreshold INT ,RIFRequiredInstances 
INT, MCPredicted INT, MCThreshold INT, MCRequiredInstances INT ,LAPredicted 
INT, LAThreshold INT,LARequiredInstances INT,RequiredInstanceCount INT 
,ActiveInstanceCount INT, AdditionalInstanceCount INT, ScalingReason 
VARCHAR(150));
+CREATE TABLE ANALYTICS_PROCESSED_DATA_STORE.MEMBER_INFORMATION(MemberId 
VARCHAR(150), InstanceType VARCHAR(150), ImageId VARCHAR(150), HostName 
VARCHAR(150), PrivateIPAddresses VARCHAR(150), PublicIPAddresses VARCHAR(150), 
Hypervisor VARCHAR(150), CPU VARCHAR(10) , RAM VARCHAR(10), OSName 
VARCHAR(150), OSVersion VARCHAR(150));

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/metering-service/capps/pom.xml 
b/extensions/das/metering-service/capps/pom.xml
new file mode 100644
index 0000000..bf19fa9
--- /dev/null
+++ b/extensions/das/metering-service/capps/pom.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <parent>
+        <artifactId>apache-stratos-metering-service</artifactId>
+        <groupId>org.apache.stratos</groupId>
+        <version>4.1.3</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>metring-service-capps</artifactId>
+    <name>Stratos Metering Service - Composite Applications</name>
+    <packaging>pom</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-clean-plugin</artifactId>
+                <version>2.4.1</version>
+                <executions>
+                    <execution>
+                        <id>auto-clean</id>
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.7</version>
+                <executions>
+                    <execution>
+                        <phase>process-resources</phase>
+                        <configuration>
+                            <target>
+                                <ant antfile="build.xml" target="zip"/>
+                            </target>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/Dashboard/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/Dashboard/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/Dashboard/artifact.xml
new file mode 100644
index 0000000..bd6d164
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/Dashboard/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="Dashboard" version="1.0.0" type="dashboards/dashboard" 
serverRole="DataAnalyticsServer">
+    <file>stratos-metering-dashboard.json</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json
 
b/extensions/das/metering-service/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json
new file mode 100644
index 0000000..7ab5567
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json
@@ -0,0 +1,267 @@
+{
+  "id": "stratos-metering-dashboard",
+  "title": "Stratos Metering Dashboard",
+  "description": "",
+  "permissions": {
+    "viewers": [],
+    "editors": [
+      "Internal/everyone"
+    ]
+  },
+  "pages": [
+    {
+      "id": "member-status",
+      "title": "Member Status",
+      "layout": {
+        "id": "single-column",
+        "title": "Single Column",
+        "description": "This is a layout generated through single-column.io",
+        "thumbnail": "store://layout/single-column/index.png",
+        "url": "store://layout/single-column/index.hbs",
+        "content": "<div class=\"container\">\n<div class=\"row\">\n    <div 
id=\"a\" class=\"col-md-12 ues-component-box ues-component-box\"></div>\n    
<div id=\"b\" class=\"col-md-12 ues-component-box\"></div>\n    <div id=\"c\" 
class=\"col-md-12 ues-component-box\"></div>\n</div>\n</div>\n"
+      },
+      "content": {
+        "a": [
+          {
+            "id": "liapi55xcknpnwmi",
+            "content": {
+              "id": "member-status-filter",
+              "title": "Member Status Filter",
+              "type": "widget",
+              "thumbnail": "store://widget/member-status-filter/index.png",
+              "data": {
+                "url": "store://widget/member-status-filter/index.xml"
+              },
+              "styles": {
+                "title": "",
+                "height": "150",
+                "borders": false,
+                "titlePosition": "left"
+              },
+              "notify": {
+                "member-status-filter": {
+                  "type": "address",
+                  "description": "This notifies time interval"
+                },
+                "cancel": {
+                  "type": "boolean",
+                  "description": "This notifies cancellation of state 
selection"
+                }
+              },
+              "options": {},
+              "settings": {}
+            }
+          }
+        ],
+        "b": [
+          {
+            "id": "ss75s4fyx168ncdi",
+            "content": {
+              "id": "Member_Count",
+              "title": "Member Count",
+              "type": "gadget",
+              "thumbnail": 
"local://store/carbon.super/gadget/usa-business-revenue/index.png",
+              "data": {
+                "url": 
"local://store/carbon.super/gadget/Member_Count/index.xml"
+              },
+              "listen": {
+                "member-status-filter": {
+                  "type": "address",
+                  "description": "Used to filter based on state",
+                  "on": [
+                    {
+                      "from": "liapi55xcknpnwmi",
+                      "event": "member-status-filter"
+                    }
+                  ]
+                },
+                "auto-update": {
+                  "type": "boolean",
+                  "description": "Used to filter based on state",
+                  "on": []
+                }
+              },
+              "styles": {
+                "title": "Member Count",
+                "height": "400",
+                "borders": true,
+                "titlePosition": "left"
+              },
+              "options": {
+                "dataSource": {
+                  "type": "STRING",
+                  "title": "Data Source",
+                  "value": 
"/portal/gadgets/bar-chart/datasource/dataFile4.jag",
+                  "options": [],
+                  "required": false
+                },
+                "updateGraph": {
+                  "type": "STRING",
+                  "title": "Update Interval (s)",
+                  "value": "No",
+                  "options": [],
+                  "required": false
+                }
+              },
+              "settings": {}
+            }
+          }
+        ],
+        "c": [
+          {
+            "id": "th1pzcad50mmfgvi",
+            "content": {
+              "id": "Member_Update",
+              "title": "Member Status",
+              "type": "gadget",
+              "thumbnail": 
"local://store/carbon.super/gadget/usa-business-revenue/index.png",
+              "data": {
+                "url": 
"local://store/carbon.super/gadget/Member_Status/index.xml"
+              },
+              "listen": {
+                "member-status-filter": {
+                  "type": "address",
+                  "description": "Used to filter based on state",
+                  "on": [
+                    {
+                      "from": "liapi55xcknpnwmi",
+                      "event": "member-status-filter"
+                    }
+                  ]
+                },
+                "auto-update": {
+                  "type": "boolean",
+                  "description": "Used to filter based on state",
+                  "on": []
+                }
+              },
+              "styles": {
+                "title": "Member Status",
+                "height": "600",
+                "borders": true,
+                "titlePosition": "left"
+              },
+              "options": {
+                "dataSource": {
+                  "type": "STRING",
+                  "title": "Data Source",
+                  "value": 
"/portal/gadgets/bar-chart/datasource/dataFile4.jag",
+                  "options": [],
+                  "required": false
+                },
+                "updateGraph": {
+                  "type": "STRING",
+                  "title": "Update Interval (s)",
+                  "value": "No",
+                  "options": [],
+                  "required": false
+                }
+              },
+              "settings": {}
+            }
+          }
+        ]
+      }
+    },
+    {
+      "id": "member-details",
+      "title": "Member Details",
+      "layout": {
+        "id": "single-column",
+        "title": "Single Column",
+        "description": "This is a layout generated through single-column.io",
+        "thumbnail": "store://layout/single-column/index.png",
+        "url": "store://layout/single-column/index.hbs",
+        "content": "<div class=\"container\">\n<div class=\"row\">\n    <div 
id=\"a\" class=\"col-md-12 ues-component-box\"></div>\n    <div id=\"b\" 
class=\"col-md-12 ues-component-box\"></div>\n    <div id=\"c\" 
class=\"col-md-12 ues-component-box\"></div>\n</div>\n</div>\n"
+      },
+      "content": {
+        "a": [
+          {
+            "id": "vdf3ksfj3q22csor",
+            "content": {
+              "id": "member-details-filter",
+              "title": "Member Details Filter",
+              "type": "widget",
+              "thumbnail": "store://widget/member-details-filter/index.png",
+              "data": {
+                "url": "store://widget/member-details-filter/index.xml"
+              },
+              "styles": {
+                "title": "",
+                "height": "100",
+                "borders": true,
+                "titlePosition": "left"
+              },
+              "notify": {
+                "member-details-filter": {
+                  "type": "address",
+                  "description": "This notifies applicationId and clusterId"
+                }
+              },
+              "cancel": {
+                "type": "boolean",
+                "description": "This notifies cancellation of state selection"
+              },
+              "options": {},
+              "settings": {}
+            }
+          }
+        ],
+        "b": [
+          {
+            "id": "svre8cc97s4z33di",
+            "content": {
+              "id": "Member_Details",
+              "title": "Member Details",
+              "type": "gadget",
+              "thumbnail": 
"local://store/carbon.super/gadget/usa-business-revenue/index.png",
+              "data": {
+                "url": 
"local://store/carbon.super/gadget/Member_Information/index.xml"
+              },
+              "listen": {
+                "member-details-filter": {
+                  "type": "address",
+                  "description": "Used to filter based on state",
+                  "on": [
+                    {
+                      "from": "vdf3ksfj3q22csor",
+                      "event": "member-details-filter"
+                    }
+                  ]
+                },
+                "auto-update": {
+                  "type": "boolean",
+                  "description": "Used to filter based on state"
+                }
+              },
+              "styles": {
+                "title": "Member Details",
+                "height": "800",
+                "borders": true,
+                "titlePosition": "left"
+              },
+              "options": {
+                "dataSource": {
+                  "type": "STRING",
+                  "title": "Data Source",
+                  "value": 
"/portal/gadgets/bar-chart/datasource/dataFile4.jag",
+                  "options": [],
+                  "required": false
+                },
+                "updateGraph": {
+                  "type": "STRING",
+                  "title": "Update Interval (s)",
+                  "value": "No",
+                  "options": [],
+                  "required": false
+                }
+              },
+              "settings": {}
+            }
+          }
+        ]
+      }
+    }
+  ],
+  "landing": "member-status"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberInfo/MemberInfoEventReceiver.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberInfo/MemberInfoEventReceiver.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberInfo/MemberInfoEventReceiver.xml
new file mode 100644
index 0000000..509788e
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberInfo/MemberInfoEventReceiver.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<eventReceiver name="MemberInfoEventReceiver" statistics="disable"
+               trace="disable" xmlns="http://wso2.org/carbon/eventreceiver";>
+    <from eventAdapterType="wso2event">
+        <property name="events.duplicated.in.cluster">false</property>
+    </from>
+    <mapping customMapping="disable" type="wso2event"/>
+    <to streamName="member_info" version="1.0.0"/>
+</eventReceiver>

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberInfo/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberInfo/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberInfo/artifact.xml
new file mode 100644
index 0000000..388b225
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberInfo/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventReceiver_MemberInfo" version="1.0.0" 
type="event/receiver" serverRole="DataAnalyticsServer">
+    <file>MemberInfoEventReceiver.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberLifecycle/MemberLifecycleEventReceiver.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberLifecycle/MemberLifecycleEventReceiver.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberLifecycle/MemberLifecycleEventReceiver.xml
new file mode 100644
index 0000000..146a5bc
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberLifecycle/MemberLifecycleEventReceiver.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<eventReceiver name="MemberLifecycleEventReceiver" statistics="disable"
+               trace="disable" xmlns="http://wso2.org/carbon/eventreceiver";>
+    <from eventAdapterType="wso2event">
+        <property name="events.duplicated.in.cluster">false</property>
+    </from>
+    <mapping customMapping="disable" type="wso2event"/>
+    <to streamName="member_lifecycle" version="1.0.0"/>
+</eventReceiver>

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberLifecycle/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberLifecycle/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberLifecycle/artifact.xml
new file mode 100644
index 0000000..be65f9e
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_MemberLifecycle/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventReceiver_MemberLifecycle" version="1.0.0" 
type="event/receiver" serverRole="DataAnalyticsServer">
+    <file>MemberLifecycleEventReceiver.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_ScalingDecision/ScalingDecisionEventReceiver.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_ScalingDecision/ScalingDecisionEventReceiver.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_ScalingDecision/ScalingDecisionEventReceiver.xml
new file mode 100644
index 0000000..0e0b8f8
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_ScalingDecision/ScalingDecisionEventReceiver.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<eventReceiver name="ScalingDecisionEventReceiver" statistics="disable"
+               trace="disable" xmlns="http://wso2.org/carbon/eventreceiver";>
+    <from eventAdapterType="wso2event">
+        <property name="events.duplicated.in.cluster">false</property>
+    </from>
+    <mapping customMapping="disable" type="wso2event"/>
+    <to streamName="scaling_decision" version="1.0.0"/>
+</eventReceiver>

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_ScalingDecision/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_ScalingDecision/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_ScalingDecision/artifact.xml
new file mode 100644
index 0000000..09d92a2
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventReceiver_ScalingDecision/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventReceiver_ScalingDecision" version="1.0.0" 
type="event/receiver" serverRole="DataAnalyticsServer">
+    <file>ScalingDecisionEventReceiver.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberInfo/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberInfo/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberInfo/artifact.xml
new file mode 100644
index 0000000..9804c9d
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberInfo/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventStore_MemberInfo" version="1.0.0" 
type="analytics/eventstore" serverRole="DataAnalyticsServer">
+    <file>member_info.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberInfo/member_info.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberInfo/member_info.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberInfo/member_info.xml
new file mode 100644
index 0000000..8b33298
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberInfo/member_info.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<EventStoreConfiguration>
+    <TableSchema>
+        <ColumnDefinition>
+            <Name>member_id</Name>
+            <EnableIndexing>true</EnableIndexing>
+            <IsPrimaryKey>true</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>instance_type</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>scaling_decision_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>is_multi_tenant</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>private_IP_addresses</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>public_IP_addresses</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>allocated_IP_addresses</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>host_name</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>hypervisor</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>cpu</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>ram</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>image_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>login_port</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>os_name</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>os_version</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>os_architecture</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>is_64bit_os</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>BOOLEAN</Type>
+        </ColumnDefinition>
+    </TableSchema>
+    <Source>
+        <StreamId>member_info:1.0.0</StreamId>
+    </Source>
+    <RecordStoreName>EVENT_STORE</RecordStoreName>
+</EventStoreConfiguration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberLifecycle/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberLifecycle/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberLifecycle/artifact.xml
new file mode 100644
index 0000000..49b6260
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberLifecycle/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventStore_MemberLifecycle" version="1.0.0" 
type="analytics/eventstore" serverRole="DataAnalyticsServer">
+    <file>member_lifecycle.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberLifecycle/member_lifecycle.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberLifecycle/member_lifecycle.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberLifecycle/member_lifecycle.xml
new file mode 100644
index 0000000..bf3b220
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_MemberLifecycle/member_lifecycle.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<EventStoreConfiguration>
+    <TableSchema>
+        <ColumnDefinition>
+            <Name>timestamp</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>LONG</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>application_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>cluster_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>cluster_alias</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>cluster_instance_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>service_name</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>network_partition_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>partition_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>member_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>member_status</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+    </TableSchema>
+    <Source>
+        <StreamId>member_lifecycle:1.0.0</StreamId>
+    </Source>
+    <RecordStoreName>EVENT_STORE</RecordStoreName>
+</EventStoreConfiguration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStore_ScalingDecision/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStore_ScalingDecision/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_ScalingDecision/artifact.xml
new file mode 100644
index 0000000..554a0a6
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_ScalingDecision/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventStore_ScalingDecision" version="1.0.0" 
type="analytics/eventstore" serverRole="DataAnalyticsServer">
+    <file>scaling_decision.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStore_ScalingDecision/scaling_decision.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStore_ScalingDecision/scaling_decision.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_ScalingDecision/scaling_decision.xml
new file mode 100644
index 0000000..49c07ac
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStore_ScalingDecision/scaling_decision.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<EventStoreConfiguration>
+    <TableSchema>
+        <ColumnDefinition>
+            <Name>timestamp</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>LONG</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>scaling_decision_id</Name>
+            <EnableIndexing>true</EnableIndexing>
+            <IsPrimaryKey>true</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>cluster_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>min_instance_count</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>max_instance_count</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>rif_predicted</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>rif_threshold</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>rif_required_instances</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>mc_predicted</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>mc_threshold</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>mc_required_instances</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>la_predicted</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>la_threshold</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>la_required_instances</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>required_instance_count</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>active_instance_count</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>additional_instance_count</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>scaling_reason</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+    </TableSchema>
+    <Source>
+        <StreamId>scaling_decision:1.0.0</StreamId>
+    </Source>
+    <RecordStoreName>EVENT_STORE</RecordStoreName>
+</EventStoreConfiguration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberInfo/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberInfo/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberInfo/artifact.xml
new file mode 100644
index 0000000..17d3e30
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberInfo/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventStream_MemberInfo" version="1.0.0" type="event/stream" 
serverRole="DataAnalyticsServer">
+    <file>member_info_1.0.0.json</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberInfo/member_info_1.0.0.json
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberInfo/member_info_1.0.0.json
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberInfo/member_info_1.0.0.json
new file mode 100644
index 0000000..d0b89a6
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberInfo/member_info_1.0.0.json
@@ -0,0 +1,76 @@
+{
+  "name": "member_info",
+  "version": "1.0.0",
+  "nickName": "Member Information",
+  "description": "Member Information",
+  "payloadData": [
+    {
+      "name": "member_id",
+      "type": "STRING"
+    },
+    {
+      "name": "instance_type",
+      "type": "STRING"
+    },
+    {
+      "name": "scaling_decision_id",
+      "type": "STRING"
+    },
+    {
+      "name": "is_multi_tenant",
+      "type": "STRING"
+    },
+    {
+      "name": "private_IP_addresses",
+      "type": "STRING"
+    },
+    {
+      "name": "public_IP_addresses",
+      "type": "STRING"
+    },
+    {
+      "name": "allocated_IP_addresses",
+      "type": "STRING"
+    },
+    {
+      "name": "host_name",
+      "type": "STRING"
+    },
+    {
+      "name": "hypervisor",
+      "type": "STRING"
+    },
+    {
+      "name": "cpu",
+      "type": "STRING"
+    },
+    {
+      "name": "ram",
+      "type": "STRING"
+    },
+    {
+      "name": "image_id",
+      "type": "STRING"
+    },
+    {
+      "name": "login_port",
+      "type": "INT"
+    },
+    {
+      "name": "os_name",
+      "type": "STRING"
+    },
+    {
+      "name": "os_version",
+      "type": "STRING"
+    },
+    {
+      "name": "os_architecture",
+      "type": "STRING"
+    },
+    {
+      "name": "is_64bit_os",
+      "type": "BOOL"
+    }
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberLifecycle/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberLifecycle/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberLifecycle/artifact.xml
new file mode 100644
index 0000000..8c97790
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberLifecycle/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventStream_MemberLifecycle" version="1.0.0" 
type="event/stream" serverRole="DataAnalyticsServer">
+    <file>member_lifecycle_1.0.0.json</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberLifecycle/member_lifecycle_1.0.0.json
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberLifecycle/member_lifecycle_1.0.0.json
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberLifecycle/member_lifecycle_1.0.0.json
new file mode 100644
index 0000000..4e6699a
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_MemberLifecycle/member_lifecycle_1.0.0.json
@@ -0,0 +1,48 @@
+{
+  "name": "member_lifecycle",
+  "version": "1.0.0",
+  "nickName": "Member Lifecycle",
+  "description": "Member Lifecycle",
+  "payloadData": [
+    {
+      "name": "timestamp",
+      "type": "LONG"
+    },
+    {
+      "name": "application_id",
+      "type": "STRING"
+    },
+    {
+      "name": "cluster_id",
+      "type": "STRING"
+    },
+    {
+      "name": "cluster_alias",
+      "type": "STRING"
+    },
+    {
+      "name": "cluster_instance_id",
+      "type": "STRING"
+    },
+    {
+      "name": "service_name",
+      "type": "STRING"
+    },
+    {
+      "name": "network_partition_id",
+      "type": "STRING"
+    },
+    {
+      "name": "partition_id",
+      "type": "STRING"
+    },
+    {
+      "name": "member_id",
+      "type": "STRING"
+    },
+    {
+      "name": "member_status",
+      "type": "STRING"
+    }
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9c1fdc75/extensions/das/metering-service/capps/stratos-metering-service/EventStream_ScalingDecision/artifact.xml
----------------------------------------------------------------------
diff --git 
a/extensions/das/metering-service/capps/stratos-metering-service/EventStream_ScalingDecision/artifact.xml
 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_ScalingDecision/artifact.xml
new file mode 100644
index 0000000..6785af1
--- /dev/null
+++ 
b/extensions/das/metering-service/capps/stratos-metering-service/EventStream_ScalingDecision/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventStream_ScalingDecision" version="1.0.0" 
type="event/stream" serverRole="DataAnalyticsServer">
+    <file>scaling_decision_1.0.0.json</file>
+</artifact>
\ No newline at end of file

Reply via email to