📜  使用 spark java 代码示例在现有 kibana 索引中添加新字段

📅  最后修改于: 2022-03-11 14:52:34.383000             🧑  作者: Mango

代码示例2
String json1 = "{\"reason\" : \"business\",\"airport\" : \"SFO\"}";  
String json2 = "{\"participants\" : 5,\"airport\" : \"OTP\"}";

JavaSparkContext jsc = ...
JavaRDD stringRDD = jsc.parallelize(ImmutableList.of(json1, json2)); 
JavaEsSpark.saveJsonToEs(stringRDD, "spark/json-trips");