instantiated spark session
val spark: SparkSession = SparkSession.builder .config("es.index.auto.create", "true") .config("es.nodes", "http://es_nodes_url") .config("es.nodes.client.only", "false") .config("es.nodes.discovery", "false") .config("es.nodes.wan.only", "true") .config("es.read.ignore_exception", "true") .config("es.port", "443") .config("es.wan.only", "true") .config("es.write.ignore_exception", "true") .config("spark.es.nodes.client.only", "false") .config("spark.es.nodes.wan.only", "true") .appName(s"Indexer") .getOrCreate()
Setup an index by checking that ES nodes are up, removing the old index and setting the template for this index.
Setup an index by checking that ES nodes are up, removing the old index and setting the template for this index.
full index name
absolute path of the template file, it will be read as a whole file by Spark.
an instance of ElasticSearchClient
instantiated spark session
instantiated spark session
val spark: SparkSession = SparkSession.builder .config("es.index.auto.create", "true") .config("es.nodes", "http://es_nodes_url") .config("es.nodes.client.only", "false") .config("es.nodes.discovery", "false") .config("es.nodes.wan.only", "true") .config("es.read.ignore_exception", "true") .config("es.port", "443") .config("es.wan.only", "true") .config("es.write.ignore_exception", "true") .config("spark.es.nodes.client.only", "false") .config("spark.es.nodes.wan.only", "true") .appName(s"Indexer") .getOrCreate()
(Since version ) see corresponding Javadoc for more information.