Skip to content

Instantly share code, notes, and snippets.

@eduardorost
Last active September 1, 2019 01:16
Show Gist options
  • Save eduardorost/047c17bed7ebd088ff655fae037d2180 to your computer and use it in GitHub Desktop.
Save eduardorost/047c17bed7ebd088ff655fae037d2180 to your computer and use it in GitHub Desktop.
val ssc = new StreamingContext(sparkConf, Seconds(60))
val rddQueue: collection.mutable.Queue[RDD[String]] = collection.mutable.Queue()
ssc.queueStream(rddQueue)
.foreachRDD(rdd => {
if (!rdd.isEmpty()) sendS3(rdd)
})
ssc.start()
ssc.awaitTermination()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment