Github user mnwone commented on a diff in the pull request:
https://github.com/apache/incubator-quarks/pull/49#discussion_r57752546
--- Diff:
test/svt/src/main/java/quarks/test/svt/apps/FleetManagementEmbeddedApplication.java
---
@@ -0,0 +1,107 @@
+package quarks.test.svt.apps;
+
+import java.io.PrintWriter;
+import java.util.concurrent.TimeUnit;
+
+import quarks.console.server.HttpServer;
+import quarks.metrics.Metrics;
+import quarks.providers.development.DevelopmentProvider;
+import quarks.test.svt.utils.sensor.gps.GpsSensor;
+import quarks.test.svt.utils.sensor.gps.SimulatedGeofence;
+import quarks.test.svt.utils.sensor.gps.SimulatedGpsSensor;
+import quarks.test.svt.utils.sensor.gps.GpsData;
+import quarks.topology.TStream;
+import quarks.topology.TWindow;
+import quarks.topology.Topology;
+
+
+public class FleetManagementEmbeddedApplication {
+
+ public static void main(String[] args) throws Exception {
+
+ //TODO: make these configurable properties
+ boolean trackGpsLocation = true;
+ boolean trackSpeeding = true;
+ boolean trackGeofence = true;
+ double MILES_PER_HOUR_TO_METERS_PER_SEC_MULTIPLER = 0.44704;
+
+ //TODO - get driverId from input/file and VIN from OBD
+ String driverId = "driver1";
+ String VIN = "123456";
+ int maxSpeedMph = 70;
+
+ boolean console = false;
+ if (args.length == 1 && args[0].toLowerCase().equals("console"))
+ console = true;
+
+ double maxSpeedMetersPerSec = maxSpeedMph *
MILES_PER_HOUR_TO_METERS_PER_SEC_MULTIPLER;
+ System.out.println("maxSpeedMph: " + maxSpeedMph);
+ System.out.println("maxSpeedMetersPerSec: " +
maxSpeedMetersPerSec);
+
+ DevelopmentProvider tp = new DevelopmentProvider();
+ Topology t1 = tp.newTopology("GPS topology");
+
+ // Source 1: GPS data
+ SimulatedGpsSensor g = new SimulatedGpsSensor();
+ TStream<GpsSensor> gpsSensor = t1.poll(() -> g.nextGps(), 500,
TimeUnit.MILLISECONDS);
+
+ // 1.1 Log GPS location
+ if (trackGpsLocation) {
+ TStream<GpsSensor> logGps = gpsSensor.peek(t ->
System.out.println("log GPS: " + t.toString()));
+ logGps.tag("logGps");
+ //TODO: replace print with write to Kafka
--- End diff --
Agreed. This is an old class and should have been deleted. In the new
class, Kafka references should have been removed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---