Created
September 29, 2016 01:56
-
-
Save RooseveltAdvisors/0c737908eea42530e0501cbf77655997 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
import org.elasticsearch.spark._ | |
import org.apache.spark.sql._ | |
//val sqlContext = new SQLContext(sc) | |
val options = Map("pushdown" -> "true", "es.nodes" -> "host_ip_here", "es.port" -> "9200", | |
"es.nodes.wan.only" -> "true") | |
sqlContext.read.format("es").options(options).load("index_name").write.mode(SaveMode.Overwrite).json("path_to_output") | |
sc.esRDD("index_name",options) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment