This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Steps to verify our Kafka Mirror App works: | |
| # Start Kafka | |
| docker run -p 2181:2181 -p 9092:9092 \ | |
| --name kafka --rm \ | |
| --env ADVERTISED_HOST=172.17.0.2 \ | |
| --env ADVERTISED_PORT=9092 \ | |
| spotify/kafka | |
| # Start producer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Williams-iMac:~ william$ python | |
| Python 2.7.13 (default, Dec 18 2016, 07:03:39) | |
| [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> def stuff(): | |
| ... yield 1 | |
| ... yield 2 | |
| ... yield 3 | |
| ... | |
| >>> list(stuff()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://news.ycombinator.com/item?id=6845585 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sealed trait DedupState[T] | |
| object DedupState { | |
| def apply[T] = NoElement[T]() | |
| case class EmitElement[T](value: T) extends DedupState[T] | |
| case class EmmittedElementAlready[T](value: T) extends DedupState[T] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| libraryDependencies += "org.apache.spark" %% "spark-core" % "1.5.2" | |
| // http://mvnrepository.com/artifact/com.twitter/chill_2.10 | |
| libraryDependencies += "com.twitter" % "chill_2.10" % "0.5.0" |