-
Notifications
You must be signed in to change notification settings - Fork 84
/
IoT-Trucking-RefApp.json
1 lines (1 loc) · 18.6 KB
/
IoT-Trucking-RefApp.json
1
{"topologyName":"IoT-Trucking-RefApp","config":"{\"topology.workers\":3,\"topology.acker.executors\":1,\"topology.message.timeout.secs\":367,\"clustersSecurityConfig\":[{}],\"topology.worker.childopts\":\"-Xmx3072m\"}","sources":[{"id":3,"topologyId":1,"topologyComponentBundleId":1,"versionId":2,"name":"KAFKA-1","description":"","config":{"properties":{"cluster":"1","consumerGroupId":"truck_speed_event_1","retryDelayPeriodMs":2,"maximumUncommittedOffsets":10000000,"maxRecordsPerPoll":"500","maximumRetries":2147483647,"parallelism":1,"emitNullTuples":false,"partitionRefreshPeriodMs":2000,"securityProtocol":"PLAINTEXT","bootstrapServers":"sandbox.hortonworks.com:6667","kafkaServiceName":"","retryDelayMaximumMs":10000,"fetchMaximumBytesPerPartition":"1048576","firstPollOffsetStrategy":"UNCOMMITTED_EARLIEST","sslTruststoreType":"JKS","clusters":"HDFSandbox","fetchMinimumBytes":"1","consumerStartupDelayMs":60000,"sslKeystoreType":"JKS","sslTrustManagerAlgo":"PKIX","retryInitialDelayMs":0,"sslKeyManagerAlgo":"SunX509","sslProtocol":"TLS","topic":"truck_speed_events_avro","pollTimeoutMs":200,"offsetCommitPeriodMs":30000}},"outputStreams":[{"id":2,"versionId":2,"streamId":"kafka_stream_3","description":null,"topologyId":1,"fields":[{"name":"eventTime","type":"STRING","optional":false},{"name":"eventSource","type":"STRING","optional":false},{"name":"truckId","type":"INTEGER","optional":false},{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"routeId","type":"INTEGER","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"speed","type":"INTEGER","optional":false}],"timestamp":1496930592077}]},{"id":1,"topologyId":1,"topologyComponentBundleId":1,"versionId":2,"name":"KAFKA","description":"","config":{"properties":{"cluster":"1","consumerGroupId":"truck_geo_event_1","retryDelayPeriodMs":2,"maximumUncommittedOffsets":10000000,"maxRecordsPerPoll":"500","maximumRetries":2147483647,"parallelism":1,"emitNullTuples":false,"partitionRefreshPeriodMs":2000,"securityProtocol":"PLAINTEXT","bootstrapServers":"sandbox.hortonworks.com:6667","kafkaServiceName":"","retryDelayMaximumMs":10000,"fetchMaximumBytesPerPartition":"1048576","firstPollOffsetStrategy":"UNCOMMITTED_EARLIEST","sslTruststoreType":"JKS","clusters":"HDFSandbox","fetchMinimumBytes":"1","consumerStartupDelayMs":60000,"sslKeystoreType":"JKS","sslTrustManagerAlgo":"PKIX","retryInitialDelayMs":0,"sslKeyManagerAlgo":"SunX509","sslProtocol":"TLS","topic":"truck_events_avro","pollTimeoutMs":200,"offsetCommitPeriodMs":30000}},"outputStreams":[{"id":1,"versionId":2,"streamId":"kafka_stream_1","description":null,"topologyId":1,"fields":[{"name":"eventTime","type":"STRING","optional":false},{"name":"eventSource","type":"STRING","optional":false},{"name":"truckId","type":"INTEGER","optional":false},{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"routeId","type":"INTEGER","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"eventType","type":"STRING","optional":false},{"name":"latitude","type":"DOUBLE","optional":false},{"name":"longitude","type":"DOUBLE","optional":false},{"name":"correlationId","type":"LONG","optional":false},{"name":"geoAddress","type":"STRING","optional":true}],"timestamp":1496930592077}]}],"sinks":[{"id":13,"topologyId":1,"topologyComponentBundleId":10,"versionId":2,"name":"HDFS","description":"","config":{"properties":{"fsUrl":"hdfs://sandbox.hortonworks.com:8020","outputFields":["eventTime","eventSource","truckId","driverId","driverName","route","latitude","eventType","routeId","longitude","correlationId","geoAddress","speed"],"cluster":"1","path":"/apps/trucking-app","extension":".txt","rotationPolicy":{"timeBasedRotation":{"rotationInterval":3,"rotationIntervalUnit":"MINUTES"}},"prefix":"","parallelism":1,"countPolicyValue":1000,"clusters":"HDFSandbox"}},"timestamp":1496930592077},{"id":12,"topologyId":1,"topologyComponentBundleId":11,"versionId":2,"name":"HBASE","description":"","config":{"properties":{"writeToWAL":true,"cluster":"1","columnFamily":"events","parallelism":1,"rowKeyField":"eventTime","batchSize":100,"clusters":"HDFSandbox","table":"default:violation_events"}},"timestamp":1496930592077},{"id":11,"topologyId":1,"topologyComponentBundleId":16,"versionId":2,"name":"DRUID-1","description":"","config":{"properties":{"cluster":"1","clusterReplication":1,"segmentGranularity":"FIFTEEN_MINUTE","indexRetryPeriod":"PT10M","maxBatchSize":100,"maxPendingBatches":5,"discoveryPath":"/druid/discovery","clusterPartitions":1,"windowPeriod":"PT10M","aggregatorList":[{"count":{"name":"cnt1"}}],"tranquilityZKconnect":"sandbox.hortonworks.com:2181","discardStreamId":"DRUID-DISCARD-STREAM-ID","indexService":"druid/overlord","blockOnFull":true,"timestampField":"processingTime","lingerMillis":0,"queryGranularity":"MINUTE","dataSource":"violation-events-cube","clusters":"HDFSandbox","dimensions":["eventTime","eventSource","truckId","driverId","driverName","routeId","route","eventType","latitude","longitude","correlationId","geoAddress","speed"]}},"timestamp":1496930592077},{"id":10,"topologyId":1,"topologyComponentBundleId":16,"versionId":2,"name":"DRUID","description":"","config":{"properties":{"cluster":"1","clusterReplication":1,"segmentGranularity":"FIFTEEN_MINUTE","indexRetryPeriod":"PT10M","maxBatchSize":100,"maxPendingBatches":5,"discoveryPath":"/druid/discovery","clusterPartitions":1,"windowPeriod":"PT10M","aggregatorList":[{"count":{"name":"cnt"}}],"tranquilityZKconnect":"sandbox.hortonworks.com:2181","discardStreamId":"DRUID-DISCARD-STREAM-ID","indexService":"druid/overlord","blockOnFull":true,"timestampField":"processingTime","lingerMillis":0,"queryGranularity":"MINUTE","dataSource":"alerts-speeding-drivers-cube","clusters":"HDFSandbox","dimensions":["driverId","driverName","route","speed_AVG","speed_AVG_Round"]}},"timestamp":1496930592077},{"id":9,"topologyId":1,"topologyComponentBundleId":12,"versionId":2,"name":"NOTIFICATION","description":"","config":{"properties":{"notifierName":"Email Notifier","parallelism":1,"className":"com.hortonworks.streamline.streams.notifiers.EmailNotifier","fieldValues":{"contentType":"text/plain","from":"[email protected]","to":"[email protected]","subject":"Speeding Driver","body":"Driver ${driverName} is speeding at ${speed_AVG_Round} mph over the last 3 minutes on route ${route}"},"notificationStoreClassName":"","jarFileName":"notifiers-38b06ce1-949b-4387-8b20-080ce7e6f213.jar","properties":{"ssl":false,"starttls":true,"debug":false,"protocol":"smtp","auth":true,"username":"[email protected]","host":"smtp.gmail.com","port":587,"password":"StrongPassword"}}},"timestamp":1496930592077}],"processors":[{"id":4,"topologyId":1,"topologyComponentBundleId":7,"versionId":2,"name":"JOIN","description":"","config":{"properties":{"joins":[{"type":"INNER","stream":"kafka_stream_3","key":"driverId","with":"kafka_stream_1"}],"parallelism":1,"from":{"stream":"kafka_stream_1","key":"driverId"},"outputKeys":["kafka_stream_1:eventTime as eventTime","kafka_stream_1:eventSource as eventSource","kafka_stream_1:truckId as truckId","kafka_stream_1:driverId as driverId","kafka_stream_1:driverName as driverName","kafka_stream_1:routeId as routeId","kafka_stream_1:route as route","eventType","latitude","longitude","correlationId","geoAddress","speed"],"window":{"windowLength":{"class":".Window$Duration","durationMs":5000},"slidingInterval":{"class":".Window$Duration","durationMs":5000},"tsField":null,"lagMs":0},"outputStream":"join_processor_stream_4"}},"outputStreams":[{"id":3,"versionId":2,"streamId":"join_processor_stream_4","description":null,"topologyId":1,"fields":[{"name":"eventTime","type":"STRING","optional":false},{"name":"eventSource","type":"STRING","optional":false},{"name":"truckId","type":"INTEGER","optional":false},{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"routeId","type":"INTEGER","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"eventType","type":"STRING","optional":false},{"name":"latitude","type":"DOUBLE","optional":false},{"name":"longitude","type":"DOUBLE","optional":false},{"name":"correlationId","type":"LONG","optional":false},{"name":"geoAddress","type":"STRING","optional":false},{"name":"speed","type":"INTEGER","optional":false}],"timestamp":1496930592077}],"timestamp":1496930592077},{"id":5,"topologyId":1,"topologyComponentBundleId":4,"versionId":2,"name":"RULE","description":"","config":{"properties":{"rules":[1]}},"outputStreams":[{"id":4,"versionId":2,"streamId":"rule_transform_stream_1","description":null,"topologyId":1,"fields":[{"name":"eventTime","type":"STRING","optional":false},{"name":"eventSource","type":"STRING","optional":false},{"name":"truckId","type":"INTEGER","optional":false},{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"routeId","type":"INTEGER","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"eventType","type":"STRING","optional":false},{"name":"latitude","type":"DOUBLE","optional":false},{"name":"longitude","type":"DOUBLE","optional":false},{"name":"correlationId","type":"LONG","optional":false},{"name":"geoAddress","type":"STRING","optional":false},{"name":"speed","type":"INTEGER","optional":false}],"timestamp":1496930592077},{"id":5,"versionId":2,"streamId":"rule_notifier_stream_1","description":null,"topologyId":1,"fields":[{"name":"eventTime","type":"STRING","optional":false},{"name":"eventSource","type":"STRING","optional":false},{"name":"truckId","type":"INTEGER","optional":false},{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"routeId","type":"INTEGER","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"eventType","type":"STRING","optional":false},{"name":"latitude","type":"DOUBLE","optional":false},{"name":"longitude","type":"DOUBLE","optional":false},{"name":"correlationId","type":"LONG","optional":false},{"name":"geoAddress","type":"STRING","optional":false},{"name":"speed","type":"INTEGER","optional":false}],"timestamp":1496930592077}],"timestamp":1496930592077},{"id":6,"topologyId":1,"topologyComponentBundleId":5,"versionId":2,"name":"AGGREGATE","description":"","config":{"properties":{"rules":[1],"parallelism":1}},"outputStreams":[{"id":6,"versionId":2,"streamId":"window_transform_stream_6","description":null,"topologyId":1,"fields":[{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"speed_AVG","type":"DOUBLE","optional":false}],"timestamp":1496930592077},{"id":7,"versionId":2,"streamId":"window_notifier_stream_6","description":null,"topologyId":1,"fields":[{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"speed_AVG","type":"DOUBLE","optional":false}],"timestamp":1496930592077}],"timestamp":1496930592077},{"id":7,"topologyId":1,"topologyComponentBundleId":4,"versionId":2,"name":"RULE-1","description":"","config":{"properties":{"rules":[2]}},"outputStreams":[{"id":8,"versionId":2,"streamId":"rule_transform_stream_2","description":null,"topologyId":1,"fields":[{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"speed_AVG","type":"DOUBLE","optional":false}],"timestamp":1496930592077},{"id":9,"versionId":2,"streamId":"rule_notifier_stream_2","description":null,"topologyId":1,"fields":[{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"speed_AVG","type":"DOUBLE","optional":false}],"timestamp":1496930592077}],"timestamp":1496930592077},{"id":8,"topologyId":1,"topologyComponentBundleId":9,"versionId":2,"name":"PROJECTION","description":"","config":{"properties":{"rules":[3]}},"outputStreams":[{"id":10,"versionId":2,"streamId":"projection_transform_stream_8","description":null,"topologyId":1,"fields":[{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"speed_AVG","type":"DOUBLE","optional":false},{"name":"speed_AVG_Round","type":"LONG","optional":false}],"timestamp":1496930592077},{"id":11,"versionId":2,"streamId":"projection_notifier_stream_8","description":null,"topologyId":1,"fields":[{"name":"driverId","type":"INTEGER","optional":false},{"name":"driverName","type":"STRING","optional":false},{"name":"route","type":"STRING","optional":false},{"name":"speed_AVG","type":"DOUBLE","optional":false},{"name":"speed_AVG_Round","type":"LONG","optional":false}],"timestamp":1496930592077}],"timestamp":1496930592077}],"edges":[{"id":2,"versionId":2,"topologyId":1,"fromId":3,"toId":4,"streamGroupings":[{"streamId":2,"grouping":"FIELDS","fields":["driverId"]}],"timestamp":1496930592077},{"id":1,"versionId":2,"topologyId":1,"fromId":1,"toId":4,"streamGroupings":[{"streamId":1,"grouping":"FIELDS","fields":["driverId"]}],"timestamp":1496930592077},{"id":3,"versionId":2,"topologyId":1,"fromId":4,"toId":5,"streamGroupings":[{"streamId":3,"grouping":"SHUFFLE","fields":null}],"timestamp":1496930592077},{"id":4,"versionId":2,"topologyId":1,"fromId":5,"toId":6,"streamGroupings":[{"streamId":4,"grouping":"FIELDS","fields":["driverId","driverName","route"]}],"timestamp":1496930592077},{"id":9,"versionId":2,"topologyId":1,"fromId":5,"toId":11,"streamGroupings":[{"streamId":4,"grouping":"SHUFFLE","fields":null}],"timestamp":1496930592077},{"id":10,"versionId":2,"topologyId":1,"fromId":5,"toId":12,"streamGroupings":[{"streamId":4,"grouping":"SHUFFLE","fields":null}],"timestamp":1496930592077},{"id":11,"versionId":2,"topologyId":1,"fromId":5,"toId":13,"streamGroupings":[{"streamId":4,"grouping":"SHUFFLE","fields":null}],"timestamp":1496930592077},{"id":5,"versionId":2,"topologyId":1,"fromId":6,"toId":7,"streamGroupings":[{"streamId":6,"grouping":"SHUFFLE","fields":null}],"timestamp":1496930592077},{"id":6,"versionId":2,"topologyId":1,"fromId":7,"toId":8,"streamGroupings":[{"streamId":8,"grouping":"SHUFFLE","fields":null}],"timestamp":1496930592077},{"id":7,"versionId":2,"topologyId":1,"fromId":8,"toId":9,"streamGroupings":[{"streamId":11,"grouping":"SHUFFLE","fields":null}],"timestamp":1496930592077},{"id":8,"versionId":2,"topologyId":1,"fromId":8,"toId":10,"streamGroupings":[{"streamId":10,"grouping":"SHUFFLE","fields":null}],"timestamp":1496930592077}],"rules":[{"id":1,"versionId":2,"topologyId":1,"name":"Violation Event","description":"Events that are infractions from drivers and trucks","streams":["join_processor_stream_4"],"condition":"eventType <> 'Normal'","sql":"SELECT * FROM join_processor_stream_4 WHERE eventType <> 'Normal'","actions":[{"__type":"com.hortonworks.streamline.streams.layout.component.rule.action.TransformAction","name":"transformAction","outputStreams":["rule_transform_stream_1"],"transforms":[]}],"outputStreams":["rule_transform_stream_1","rule_notifier_stream_1"],"timestamp":1496930592077},{"id":2,"versionId":2,"topologyId":1,"name":"Speeding Driver","description":"Driver who is speeding excessively","streams":["window_transform_stream_6"],"condition":"speed_AVG > 80","sql":"SELECT * FROM window_transform_stream_6 WHERE speed_AVG > 80","actions":[{"__type":"com.hortonworks.streamline.streams.layout.component.rule.action.TransformAction","name":"transformAction","outputStreams":["rule_transform_stream_2"],"transforms":[]}],"outputStreams":["rule_transform_stream_2","rule_notifier_stream_2"],"timestamp":1496930592077},{"id":3,"versionId":2,"topologyId":1,"name":"projection_auto_generated","description":"projection description auto generated","streams":["rule_transform_stream_2"],"projections":[{"functionName":"ROUND","args":["speed_AVG"],"outputFieldName":"speed_AVG_Round"},{"expr":"driverId"},{"expr":"driverName"},{"expr":"route"},{"expr":"speed_AVG"}],"sql":"SELECT ROUND(speed_AVG) AS \"speed_AVG_Round\",driverId,driverName,route,speed_AVG FROM rule_transform_stream_2","actions":[{"__type":"com.hortonworks.streamline.streams.layout.component.rule.action.NotifierAction","name":"notifierAction","outputStreams":["projection_notifier_stream_8"],"notifierName":"Email Notifier","outputFieldsAndDefaults":{"from":"[email protected]","to":"[email protected]","body":"Driver ${driverName} is speeding at ${speed_AVG_Round} mph over the last 3 minutes on route ${route}","contentType":"text/plain","subject":"Speeding Driver"}},{"__type":"com.hortonworks.streamline.streams.layout.component.rule.action.TransformAction","name":"transformAction","outputStreams":["projection_transform_stream_8"],"transforms":[]}],"outputStreams":["projection_transform_stream_8","projection_notifier_stream_8"],"timestamp":1496930592077}],"windows":[{"id":1,"versionId":2,"topologyId":1,"name":"window_auto_generated","description":"window description auto generated","streams":["rule_transform_stream_1"],"window":{"windowLength":{"class":".Window$Duration","durationMs":180000},"slidingInterval":{"class":".Window$Duration","durationMs":180000},"tsField":null,"lagMs":0},"actions":[{"__type":"com.hortonworks.streamline.streams.layout.component.rule.action.TransformAction","name":"transformAction","outputStreams":["window_transform_stream_6"],"transforms":[]}],"projections":[{"functionName":"MEAN","args":["speed"],"outputFieldName":"speed_AVG"},{"expr":"driverId"},{"expr":"driverName"},{"expr":"route"}],"groupbykeys":["driverId","driverName","route"],"outputStreams":["window_transform_stream_6","window_notifier_stream_6"],"timestamp":1496930592077}],"branchRules":[],"bundleIdToType":{"11":"HBASE","1":"KAFKA","12":"NOTIFICATION","4":"RULE","16":"DRUID","5":"WINDOW","7":"JOIN","9":"PROJECTION","10":"HDFS"},"topologyEditorMetadata":{"topologyId":1,"versionId":2,"data":"{\"sources\":[{\"x\":135,\"y\":297,\"id\":1},{\"x\":135,\"y\":410,\"id\":3}],\"processors\":[{\"x\":443.75,\"y\":351.25,\"id\":4},{\"x\":683.6390380859375,\"y\":351.3726501464844,\"id\":5},{\"x\":943.8413696289062,\"y\":234.1502227783203,\"id\":6},{\"x\":1180.9815673828125,\"y\":233.8817596435547,\"id\":7},{\"x\":1452.352294921875,\"y\":233.8817596435547,\"id\":8}],\"sinks\":[{\"x\":1685.504638671875,\"y\":193.9217529296875,\"id\":9},{\"x\":1682.99072265625,\"y\":279.3943786621094,\"id\":10},{\"x\":943.3538208007812,\"y\":351.5297546386719,\"id\":11},{\"x\":944.5713500976562,\"y\":478.15032958984375,\"id\":12},{\"x\":945.788818359375,\"y\":585.290771484375,\"id\":13}],\"graphTransforms\":{\"dragCoords\":[51.65864029455611,-21.889693736418963],\"zoomScale\":0.8179428244879393}}","timestamp":1496930586004}}