提交 9fea951f 编写于 作者: H Henry Saputra

Remove dup code fromRemoteExecutor#executePlan method

Remove dup code by delegating call from RemoteExecutor#executePlan to RemoteExecutor#executePlanWithJars.

Author: Henry Saputra <henry.saputra@gmail.com>

Closes #307 from hsaputra/reduce_dup_code_in_executePlan and squashes the following commits:

a98f3b6 [Henry Saputra] Remove dup code by delegating call from RemoteExecutor#executePlan to RemoteExecutor#executePlanWithJars.
上级 be035982
......@@ -42,7 +42,6 @@ public class RemoteExecutor extends PlanExecutor {
private final InetSocketAddress address;
public RemoteExecutor(String hostname, int port) {
this(hostname, port, Collections.<String>emptyList());
}
......@@ -63,7 +62,6 @@ public class RemoteExecutor extends PlanExecutor {
this.jarFiles = jarFiles;
this.address = inet;
}
public static InetSocketAddress getInetFromHostport(String hostport) {
// from http://stackoverflow.com/questions/2345063/java-common-way-to-validate-and-convert-hostport-to-inetsocketaddress
......@@ -84,9 +82,7 @@ public class RemoteExecutor extends PlanExecutor {
@Override
public JobExecutionResult executePlan(Plan plan) throws Exception {
JobWithJars p = new JobWithJars(plan, this.jarFiles);
Client c = new Client(this.address, new Configuration(), p.getUserCodeClassLoader());
return c.run(p, -1, true);
return executePlanWithJars(p);
}
public JobExecutionResult executePlanWithJars(JobWithJars p) throws Exception {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册