We are trying to build a setup where we have a server that submits jobs of different users to the Livy server via the REST API. And we have submitted the jar in hdfs and calling that from livy client.
There is demo code,where it is calling json-simple jar and getting exception -
The exception is that -
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/json/simple/parser/JSONParser
So,what could be the solution to handle external jars in the livy.
As we are trying to execute the following code- code follows-
try {
LivyClient client = new LivyClientBuilder().setURI(new URI(livyUrl)).build();
String s="hdfs://ofss2311699:8020/user/jars/json_parsing_module.jar";
client.addJar(new URI(s)).get();
String json_string= "[0,{\"1\":{\"2\":{\"3\":{\"4\":[5,{\"6\":7}]}}}}]";
client.submit(new JsonParse(json_string)).get();
}
finally {
}