Created
September 1, 2017 19:42
-
-
Save hadoopsters/e37c2bb40d1853f7738e44baa927d7b6 to your computer and use it in GitHub Desktop.
This file contains 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
val mydstream = ... // these usually come from Spark Streaming apps | |
// they basically contain a chain of RDDs that you can convert to DFs | |
mydstream.foreachRDD(rdd => { | |
hiveContext.createDataFrame(rdd) | |
.write | |
.option("orc.compress", "snappy") | |
.mode(SaveMode.Append) | |
.orc("/this/is/an/hdfs/directory/too") | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment