Repository: stratos Updated Branches: refs/heads/stratos-4.1.x 032287049 -> 907903b95
http://git-wip-us.apache.org/repos/asf/stratos/blob/1ecd7a08/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus_1.0.0/artifact.xml ---------------------------------------------------------------------- diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus_1.0.0/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus_1.0.0/artifact.xml deleted file mode 100644 index 593f037..0000000 --- a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus_1.0.0/artifact.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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="GadgetMemberStatus" version="1.0.0" type="dashboards/gadget" serverRole="DataAnalyticsServer"> - <file>Member_Status</file> -</artifact> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/1ecd7a08/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo_1.0.0/artifact.xml ---------------------------------------------------------------------- diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo_1.0.0/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo_1.0.0/artifact.xml deleted file mode 100644 index f6ae7ee..0000000 --- a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo_1.0.0/artifact.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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="SparkscriptsMemberInfo" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer"> - <file>member_information.xml</file> -</artifact> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/1ecd7a08/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo_1.0.0/member_information.xml ---------------------------------------------------------------------- diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo_1.0.0/member_information.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo_1.0.0/member_information.xml deleted file mode 100644 index ef838b6..0000000 --- a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo_1.0.0/member_information.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?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. - ---> -<Analytics> - <Name>member_information</Name> - <Script> - CREATE TEMPORARY TABLE memberinfo - USING CarbonAnalytics - OPTIONS (tableName "MEMBER_INFO"); - - create temporary table member_details - using CarbonJDBC options (dataSource "WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB", tableName "MEMBER_INFORMATION"); - - INSERT OVERWRITE TABLE member_details select member_id, instance_type, image_id, host_name, - private_IP_addresses, public_IP_addresses, hypervisor, cpu, ram, os_name, os_version from memberinfo; - </Script> - <CronExpression>29 * * * * ?</CronExpression> -</Analytics> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/1ecd7a08/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle_1.0.0/artifact.xml ---------------------------------------------------------------------- diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle_1.0.0/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle_1.0.0/artifact.xml deleted file mode 100644 index 153da46..0000000 --- a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle_1.0.0/artifact.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?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="SparkscriptsMemberLifecycle" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer"> - <file>member_count.xml</file> -</artifact> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/1ecd7a08/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle_1.0.0/member_count.xml ---------------------------------------------------------------------- diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle_1.0.0/member_count.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle_1.0.0/member_count.xml deleted file mode 100644 index efebc24..0000000 --- a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle_1.0.0/member_count.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?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. - ---> -<Analytics> - <Name>member_count</Name> - <Script> - CREATE TEMPORARY TABLE memberstatus - USING CarbonAnalytics - OPTIONS (tableName "MEMBER_LIFECYCLE"); - - create temporary table member_count - using CarbonJDBC options (dataSource "WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB", tableName "MEMBER_COUNT"); - - ;WITH MemberCount as - (select application_id, cluster_alias, - count(case when member_status='Created' and timestamp > current_time(null)-10000 and - timestamp<= current_time(null) then 1 else NULL end) as created_instance_count, - count(case when member_status='Initialized' and timestamp > current_time(null)-10000 and - timestamp<= current_time(null) then 1 else NULL end) as initialized_instance_count, - count(case when member_status='Active' and timestamp > current_time(null)-10000 and - timestamp<= current_time(null) then 1 else NULL end) as active_instance_count, - count(case when member_status='Terminated' and timestamp > current_time(null)-10000 and - timestamp<= current_time(null) then 1 else NULL end) as terminated_instance_count - from memberstatus group by application_id, cluster_alias) - INSERT INTO table member_count - select current_time(null), application_id, cluster_alias, - created_instance_count,initialized_instance_count,active_instance_count, - terminated_instance_count from MemberCount; - - create temporary table member_status_new - using CarbonJDBC options (dataSource "WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB", tableName "MEMBER_STATUS"); - - INSERT OVERWRITE TABLE member_status_new select timestamp, application_id, cluster_alias, member_id, - member_status from memberstatus; - </Script> - <CronExpression>0/10 * * * * ?</CronExpression> -</Analytics> \ No newline at end of file
