runJob(conf);
}
@Test
public void testUpdateOnlyParamJsonScriptWithArray() throws Exception {
JobConf conf = createJobConf();
conf.set(ConfigurationOptions.ES_RESOURCE, "mroldapi/createwithid");
conf.set(ConfigurationOptions.ES_INDEX_AUTO_CREATE, "yes");
conf.set(ConfigurationOptions.ES_WRITE_OPERATION, "update");
conf.set(ConfigurationOptions.ES_MAPPING_ID, "number");
conf.set(ConfigurationOptions.ES_UPDATE_SCRIPT, "list = new HashSet(); list.add(ctx._source.list); list.add(some_list); ctx._source.list= list.toArray()");
conf.set(ConfigurationOptions.ES_UPDATE_SCRIPT_LANG, "groovy");
conf.set(ConfigurationOptions.ES_UPDATE_SCRIPT_PARAMS_JSON, "{ \"some_list\": [\"one\", \"two\"]}");
runJob(conf);
// conf = createJobConf();
// conf.set(ConfigurationOptions.ES_RESOURCE, "mroldapi/createwithid");