few fixes after testing the device type with the refactoring

application-manager-new
ayyoob 9 years ago
parent d19da2357b
commit d2f223da90

@ -17,7 +17,7 @@
~ under the License. ~ under the License.
--> -->
<project name="create-sample-sensor-capps" default="zip" basedir="."> <project name="create-connectedcup-capps" default="zip" basedir=".">
<property name="project-name" value="${ant.project.name}"/> <property name="project-name" value="${ant.project.name}"/>
<property name="target-dir" value="target/carbonapps"/> <property name="target-dir" value="target/carbonapps"/>

@ -17,6 +17,6 @@
~ under the License. ~ under the License.
--> -->
<artifact name="Sparkscripts" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer"> <artifact name="coffee_level_script" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
<file>coffee_level_script.xml</file> <file>coffee_level_script.xml</file>
</artifact> </artifact>

@ -20,18 +20,11 @@
<Analytics> <Analytics>
<Name>coffee_level_script</Name> <Name>coffee_level_script</Name>
<Script> <Script>
CREATE TEMPORARY TABLE DeviceCoffeeLevelData USING CarbonAnalytics OPTIONS(tableName CREATE TEMPORARY TABLE DeviceCoffeeLevelData USING CarbonAnalytics OPTIONS(tableName "ORG_WSO2_IOT_DEVICES_COFFEELEVEL");
"ORG_WSO2_IOT_DEVICES_COFFEELEVEL");
CREATE TEMPORARY TABLE DeviceCoffeeLevelSummaryData USING CarbonAnalytics OPTIONS (tableName CREATE TEMPORARY TABLE DeviceCoffeeLevelSummaryData USING CarbonAnalytics OPTIONS (tableName "DEVICE_COFFEELEVEL_SUMMARY", schema "coffeelevel FLOAT, deviceType STRING -i, deviceId STRING -i, owner STRING -i, time LONG -i",primaryKeys "deviceType, deviceId, owner, time");
"DEVICE_COFFEELEVEL_SUMMARY", schema "coffeelevel FLOAT, deviceType STRING -i, deviceId STRING -i, owner
STRING -i,
time LONG -i",primaryKeys "deviceType, deviceId, owner, time");
insert into table DeviceCoffeeLevelSummaryData select coffeelevel, meta_deviceType as deviceType, insert into table DeviceCoffeeLevelSummaryData select coffeelevel, meta_deviceType as deviceType, meta_deviceId as deviceId, meta_owner as owner, cast(meta_time/1000 as BIGINT)as time from DeviceCoffeeLevelData group by coffeelevel, meta_deviceType, meta_deviceId, meta_owner, cast(meta_time/1000 as BIGINT);
meta_deviceId as deviceId, meta_owner as owner, cast(meta_time/1000 as BIGINT)as time from
DeviceCoffeeLevelData group by coffeelevel, meta_deviceType, meta_deviceId, meta_owner, cast(meta_time/1000 as
BIGINT);
</Script> </Script>
<CronExpression>0 * * * * ?</CronExpression> <CronExpression>0 0/5 * * * ?</CronExpression>
</Analytics> </Analytics>

@ -1,7 +1,7 @@
{ {
"name": "org.wso2.iot.devices.coffeelevel", "name": "org.wso2.iot.devices.coffeelevel",
"version": "1.0.0", "version": "1.0.0",
"nickName": "Coffee Level Data", "nickName": "CoffeeLevel",
"description": "Coffee Level data received from the Device", "description": "Coffee Level data received from the Device",
"metaData": [ "metaData": [
{"name":"owner","type":"STRING"}, {"name":"owner","type":"STRING"},
@ -15,6 +15,3 @@
} }
] ]
} }

@ -17,7 +17,7 @@
~ under the License. ~ under the License.
--> -->
<eventReceiver name="EventReceiver_ConnectedCup" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver"> <eventReceiver name="connected_cup_receiver" statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
<from eventAdapterType="oauth-mqtt"> <from eventAdapterType="oauth-mqtt">
<property name="topic">carbon.super/connectedcup/#</property> <property name="topic">carbon.super/connectedcup/#</property>
<property name="username">admin</property> <property name="username">admin</property>

@ -1,7 +1,7 @@
{ {
"name": "org.wso2.iot.connectedcup", "name": "org.wso2.iot.connectedcup",
"version": "1.0.0", "version": "1.0.0",
"nickName": "connectedcup stream", "nickName": "connectedcup",
"description": "This hold the device type stream of connectedcup", "description": "This hold the device type stream of connectedcup",
"metaData": [ "metaData": [
{"name": "owner", "type": "STRING"}, {"name": "owner", "type": "STRING"},

@ -18,7 +18,7 @@
var palette = new Rickshaw.Color.Palette({scheme: "classic9"}); var palette = new Rickshaw.Color.Palette({scheme: "classic9"});
function drawGraph(from, to) { function drawGraph_connectedcup(from, to) {
retrieveDataAndDrawLineGraph("temperature", from, to); retrieveDataAndDrawLineGraph("temperature", from, to);
retrieveDataAndDrawLineGraph("coffeelevel", from, to); retrieveDataAndDrawLineGraph("coffeelevel", from, to);
} }

Loading…
Cancel
Save