Merge branch 'master' of https://github.com/wso2/product-iots into IoTS-1.0.0
commit
119aff7fc4
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
~
|
||||
~ WSO2 Inc. 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.
|
||||
-->
|
||||
|
||||
<udf-configuration>
|
||||
<custom-udf-classes>
|
||||
<class-name>org.wso2.carbon.analytics.spark.core.udf.defaults.StringConcatenator</class-name>
|
||||
<class-name>org.wso2.carbon.analytics.spark.core.udf.defaults.TimestampUDF</class-name>
|
||||
<class-name>org.wso2.carbon.analytics.spark.core.udf.defaults.TimeNowUDF</class-name>
|
||||
<class-name>org.wso2.carbon.analytics.spark.core.udf.facets.FacetUDF</class-name>
|
||||
<class-name>org.wso2.carbon.analytics.shared.common.udf.DateTimeUDF</class-name>
|
||||
</custom-udf-classes>
|
||||
<custom-udaf-classes>
|
||||
<custom-udaf>
|
||||
<alias>geometricMean</alias>
|
||||
<class-name>org.wso2.carbon.analytics.spark.core.udaf.defaults.GeometricMeanUDAF</class-name>
|
||||
</custom-udaf>
|
||||
<custom-udaf>
|
||||
<alias>harmonicMean</alias>
|
||||
<class-name>org.wso2.carbon.analytics.spark.core.udaf.defaults.HarmonicMeanUDAF</class-name>
|
||||
</custom-udaf>
|
||||
</custom-udaf-classes>
|
||||
</udf-configuration>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||
*
|
||||
* Licensed 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.
|
||||
*/
|
||||
|
||||
var getDateString, getDuration;
|
||||
|
||||
(function() {
|
||||
|
||||
getDateString = function (timestamp) {
|
||||
var date = new Date();
|
||||
date.setTime(timestamp);
|
||||
return date.toString();
|
||||
};
|
||||
|
||||
getDuration = function (durationInMS) {
|
||||
var time = '';
|
||||
var date = new Date();
|
||||
date.setTime(durationInMS);
|
||||
|
||||
var day = Math.floor(durationInMS/86400000);
|
||||
if (day > 0){
|
||||
//More than 1 day
|
||||
time = day +' day : ';
|
||||
durationInMS = durationInMS - (day * 86400000);
|
||||
}
|
||||
var hour = Math.floor(durationInMS/3600000);
|
||||
if (hour > 0){
|
||||
//More than 1 hour
|
||||
time = time + hour + ' hour : ';
|
||||
durationInMS = durationInMS - (hour * 3600000);
|
||||
}
|
||||
|
||||
var minutes = Math.floor(durationInMS/60000);
|
||||
if (minutes > 0){
|
||||
//More than 1 minute
|
||||
time = time + minutes + ' minutes : ';
|
||||
durationInMS = durationInMS - (minutes * 60000);
|
||||
}
|
||||
|
||||
var seconds = Math.ceil(durationInMS/1000);
|
||||
if (seconds > 0){
|
||||
//More than 1 minute
|
||||
time = time + seconds + ' seconds : ';
|
||||
}
|
||||
time = time.slice(0, -2);
|
||||
return time;
|
||||
};
|
||||
}());
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<streamConfiguration type="csv">
|
||||
<file>activity_data.csv</file>
|
||||
<streamID>org.wso2.iot.android.activity:1.0.0</streamID>
|
||||
<separateChar>,</separateChar>
|
||||
<delayBetweenEventsInMilies>1</delayBetweenEventsInMilies>
|
||||
</streamConfiguration>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<streamConfiguration type="csv">
|
||||
<file>audio_data.csv</file>
|
||||
<streamID>org.wso2.iot.android.audio:1.0.0</streamID>
|
||||
<separateChar>,</separateChar>
|
||||
<delayBetweenEventsInMilies>1000</delayBetweenEventsInMilies>
|
||||
</streamConfiguration>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<streamConfiguration type="csv">
|
||||
<file>battery_data.csv</file>
|
||||
<streamID>org.wso2.iot.android.battery:1.0.0</streamID>
|
||||
<separateChar>,</separateChar>
|
||||
<delayBetweenEventsInMilies>1000</delayBetweenEventsInMilies>
|
||||
</streamConfiguration>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<streamConfiguration type="csv">
|
||||
<file>call_data.csv</file>
|
||||
<streamID>org.wso2.iot.android.call:1.0.0</streamID>
|
||||
<separateChar>,</separateChar>
|
||||
<delayBetweenEventsInMilies>1000</delayBetweenEventsInMilies>
|
||||
</streamConfiguration>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<streamConfiguration type="csv">
|
||||
<file>location_data.csv</file>
|
||||
<streamID>org.wso2.iot.android.location:1.0.0</streamID>
|
||||
<separateChar>,</separateChar>
|
||||
<delayBetweenEventsInMilies>1000</delayBetweenEventsInMilies>
|
||||
</streamConfiguration>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<streamConfiguration type="csv">
|
||||
<file>network_data.csv</file>
|
||||
<streamID>org.wso2.iot.android.data:1.0.0</streamID>
|
||||
<separateChar>,</separateChar>
|
||||
<delayBetweenEventsInMilies>1</delayBetweenEventsInMilies>
|
||||
</streamConfiguration>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<streamConfiguration type="csv">
|
||||
<file>screen_data.csv</file>
|
||||
<streamID>org.wso2.iot.android.screen:1.0.0</streamID>
|
||||
<separateChar>,</separateChar>
|
||||
<delayBetweenEventsInMilies>1000</delayBetweenEventsInMilies>
|
||||
</streamConfiguration>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<streamConfiguration type="csv">
|
||||
<file>sms_data.csv</file>
|
||||
<streamID>org.wso2.iot.android.sms:1.0.0</streamID>
|
||||
<separateChar>,</separateChar>
|
||||
<delayBetweenEventsInMilies>1000</delayBetweenEventsInMilies>
|
||||
</streamConfiguration>
|
Loading…
Reference in new issue