kscaldef / summingbird-hybrid-example Goto Github PK
View Code? Open in Web Editor NEWA self-contained example of summingbird running in hybrid mode
A self-contained example of summingbird running in hybrid mode
This is a modification of the summingbird-example provided by Twitter, using a Kafka source for events and implementing the hybrid batch-realtime approach. PREREQUISITES ------------- You need to have memcached, zookeeper, and kafka installed and running on your machine on the usual ports. RUNNING --------------------------------- To demo the hybrid mode: sbt 'run-main summingbird.proto.RunHybrid' You'll see a bunch of start-up messages, and then it should settle into regularly spitting out some "sanity check" messages once a minute, both a detailed view of what's been computed on a single key, and aggregate data about how many messages have been produced and seen at various stages. (Some small lag is expected, but should remain fairly steady over time.) Once every 5 minutes, the demo rolls over a new log file and kicks off a batch computation to update the "offline" store. Example output after running for a while: 14/03/27 13:31:30 INFO example.HybridRunner$: Offline: Some((BatchID.4653174,296)) 14/03/27 13:31:30 INFO example.HybridRunner$: Online: (BatchID.4653174,Some(10)) 14/03/27 13:31:30 INFO example.HybridRunner$: Hybrid: Some(306) 14/03/27 13:31:30 INFO example.RunHybrid$: Events Produced: 2875 14/03/27 13:31:30 INFO example.RunHybrid$: Events Ingested: 2875 14/03/27 13:31:30 INFO example.RunHybrid$: Events Counted (offline): 2784 14/03/27 13:31:30 INFO example.RunHybrid$: Events Counted (online): 81 14/03/27 13:31:30 INFO example.RunHybrid$: Events Counted (hybrid): 2865
Thanks for this awesome example.
I think I'm stuck on something really stupid. Basically, I got things working except that on starting the program Zookeeper throws this error "no brokers found when trying to rebalance."
After that I can see the events being produced and put into the kafka queue, but nothing gets ingested. (Events Ingested is always 0)
Hi I am using Kafka 8 to run this hybrid example. I get this exceptions when I try to run (It says the error is because it expects the path length to be > 0 and is found to be 0). Any idea on how to fix this?
14/11/18 14:55:57 ERROR proto.RunHybrid$: ingestion error
java.lang.ExceptionInInitializerError
at summingbird.proto.RunHybrid$$anon$1.run(HybridRunner.scala:88)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Path length must be > 0
at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:48)
at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:35)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:626)
at org.I0Itec.zkclient.ZkConnection.create(ZkConnection.java:87)
at org.I0Itec.zkclient.ZkClient$1.call(ZkClient.java:308)
at org.I0Itec.zkclient.ZkClient$1.call(ZkClient.java:304)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:675)
at org.I0Itec.zkclient.ZkClient.create(ZkClient.java:304)
at org.I0Itec.zkclient.ZkClient.createPersistent(ZkClient.java:213)
at org.I0Itec.zkclient.ZkClient.createPersistent(ZkClient.java:223)
at org.I0Itec.zkclient.ZkClient.createPersistent(ZkClient.java:223)
at org.I0Itec.zkclient.ZkClient.createPersistent(ZkClient.java:223)
at kafka.utils.ZkUtils$.createParentPath(Unknown Source)
at kafka.utils.ZkUtils$.createEphemeralPath(Unknown Source)
at kafka.utils.ZkUtils$.createEphemeralPathExpectConflict(Unknown Source)
at kafka.utils.ZkUtils$.createEphemeralPathExpectConflictHandleZKBug(Unknown Source)
at kafka.consumer.ZookeeperConsumerConnector.kafka$consumer$ZookeeperConsumerConnector$$registerConsumerInZK(Unknown Source)
at kafka.consumer.ZookeeperConsumerConnector.consume(Unknown Source)
at kafka.consumer.ZookeeperConsumerConnector.createMessageStreams(Unknown Source)
at kafka.consumer.ZookeeperConsumerConnector.createMessageStreams(Unknown Source)
at summingbird.proto.Ingestion$.(Ingestion.scala:33)
at summingbird.proto.Ingestion$.(Ingestion.scala)
... 8 more
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.