ZEPPELIN-773 livy to have conf for configuring yarn master

This commit is contained in:
Prabhjyot Singh 2016-05-11 21:18:48 +05:30
parent 134923ddfc
commit 23b78117cd
2 changed files with 7 additions and 2 deletions

View file

@ -62,8 +62,11 @@ public class LivyHelper {
try {
String json = executeHTTP(property.getProperty("zeppelin.livy.url") + "/sessions",
"POST",
"{\"kind\": \"" + kind + "\", \"proxyUser\": \""
+ context.getAuthenticationInfo().getUser() + "\"}",
"{" +
"\"kind\": \"" + kind + "\", " +
"\"master\": \"" + property.getProperty("zeppelin.livy.master") + "\", " +
"\"proxyUser\": \"" + context.getAuthenticationInfo().getUser() + "\"" +
"}",
context.getParagraphId()
);
Map jsonMap = (Map<Object, Object>) gson.fromJson(json,

View file

@ -34,6 +34,7 @@ import java.util.Properties;
public class LivySparkInterpreter extends Interpreter {
static String DEFAULT_URL = "http://localhost:8998";
static String LOCAL = "local";
Logger LOGGER = LoggerFactory.getLogger(LivySparkInterpreter.class);
private LivyOutputStream out;
@ -44,6 +45,7 @@ public class LivySparkInterpreter extends Interpreter {
LivySparkInterpreter.class.getName(),
new InterpreterPropertyBuilder()
.add("zeppelin.livy.url", DEFAULT_URL, "The URL for Livy Server.")
.add("zeppelin.livy.master", LOCAL, "Spark master uri. ex) spark://masterhost:7077")
.build()
);
}