Horje
adding new field in existing kibana index using spark java Code Example
adding new field in existing kibana index using spark java
String json1 = "{\"reason\" : \"business\",\"airport\" : \"SFO\"}";  
String json2 = "{\"participants\" : 5,\"airport\" : \"OTP\"}";

JavaSparkContext jsc = ...
JavaRDD<String> stringRDD = jsc.parallelize(ImmutableList.of(json1, json2)); 
JavaEsSpark.saveJsonToEs(stringRDD, "spark/json-trips");             
adding new field in existing kibana index using spark java
val game = Map(
  "media_type"->"game", 
      "title" -> "FF VI",
       "year" -> "1994")
val book = Map("media_type" -> "book","title" -> "Harry Potter","year" -> "2010")
val cd = Map("media_type" -> "music","title" -> "Surfing With The Alien")

sc.makeRDD(Seq(game, book, cd)).saveToEs("my-collection-{media_type}/doc")  




Java

Related
how to show the hex detail of a file in java Code Example how to show the hex detail of a file in java Code Example
Spring security avec spring version 2.5.6 Code Example Spring security avec spring version 2.5.6 Code Example
how to put string in char array in java tutorialspoint Code Example how to put string in char array in java tutorialspoint Code Example
use scanner class in global scope java Code Example use scanner class in global scope java Code Example
reverse a doubly linked list Code Example reverse a doubly linked list Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8