package it.uniroma2.ember;

/**
 * Created by odysseus on 09/03/17.
 */
public class EmberSensorsAggregation {
}

@@ -25,89 +25,1275 @@
 r;%0A%0A
-/**%0A * C
+import org.apache.flink.api.java.functions.KeySelector;%0Aimport org.apache.flink.api.java.tuple.Tuple2;%0A%0A/**%0A * This is a utility class for agg
 re
+g
 ate
-d by odysseus on 09/03/17.%0A */%0Apublic class EmberSensorsAggregation %7B
+ statistics in Project Ember%0A */%0A%0Apublic class EmberSensorsAggregation %7B%0A%0A    /**%0A     * Implements a simple KeySelector to divide by key (address) the traffic data - window join%0A     */%0A    public static final class EmberTrafficMeanSelector implements KeySelector%3CTuple2%3CString, Float%3E, String%3E %7B%0A%0A        /**%0A         * @param trafficData the tuple %3Ckey, traffic_intensity%3E%0A         * @return address as a key%0A         * @throws Exception%0A         */%0A        @Override%0A        public String getKey(Tuple2%3CString, Float%3E trafficData) throws Exception %7B%0A            return trafficData.f0;%0A        %7D%0A    %7D%0A%0A    /**%0A     * Implements a simple KeySelector to divide by key (address) the lumen data - window join%0A     */%0A    public static final class EmberLumenMeanSelector implements KeySelector%3CTuple2%3CString, Float%3E, String%3E %7B%0A%0A        /**%0A         * @param lumenData the tuple %3Ckey, light_level%3E%0A         * @return address as a key%0A         * @throws Exception%0A         */%0A        @Override%0A        public String getKey(Tuple2%3CString, Float%3E lumenData) throws Exception %7B%0A            return lumenData.f0;%0A        %7D%0A    %7D
 %0A%7D%0A

Add key selectors for aggregation of traffic and lumen.