public class Client extends Object
| Constructor and Description |
|---|
Client(Configuration config)
Creates a instance that submits the programs to the job-manager defined in the
configuration.
|
Client(InetSocketAddress jobManagerAddress,
Configuration config)
Creates a new instance of the class that submits the jobs to a job-manager.
|
| Modifier and Type | Method and Description |
|---|---|
JobGraph |
getJobGraph(PackagedProgram prog,
OptimizedPlan optPlan) |
String |
getJobManagerAddress() |
int |
getJobManagerPort() |
OptimizedPlan |
getOptimizedPlan(JobWithJars prog,
int parallelism)
Creates the optimized plan for a given program, using this client's compiler.
|
OptimizedPlan |
getOptimizedPlan(PackagedProgram prog,
int parallelism) |
OptimizedPlan |
getOptimizedPlan(Plan p,
int parallelism) |
String |
getOptimizedPlanAsJson(PackagedProgram prog,
int parallelism) |
JobExecutionResult |
run(JobGraph jobGraph,
boolean wait) |
JobExecutionResult |
run(JobWithJars prog,
int parallelism,
boolean wait)
Runs a program on the nephele system whose job-manager is configured in this client's configuration.
|
JobExecutionResult |
run(OptimizedPlan compiledPlan,
List<File> libraries,
boolean wait) |
JobExecutionResult |
run(PackagedProgram prog,
int parallelism,
boolean wait) |
JobExecutionResult |
run(PackagedProgram prog,
OptimizedPlan optimizedPlan,
boolean wait) |
void |
setPrintStatusDuringExecution(boolean print) |
public Client(InetSocketAddress jobManagerAddress, Configuration config)
jobManagerAddress - Address and port of the job-manager.public Client(Configuration config)
config - The config used to obtain the job-manager's address.public void setPrintStatusDuringExecution(boolean print)
public String getJobManagerAddress()
public int getJobManagerPort()
public String getOptimizedPlanAsJson(PackagedProgram prog, int parallelism) throws CompilerException, ProgramInvocationException
public OptimizedPlan getOptimizedPlan(PackagedProgram prog, int parallelism) throws CompilerException, ProgramInvocationException
public OptimizedPlan getOptimizedPlan(Plan p, int parallelism) throws CompilerException
CompilerExceptionpublic OptimizedPlan getOptimizedPlan(JobWithJars prog, int parallelism) throws CompilerException, ProgramInvocationException
prog - The program to be compiled.CompilerException - Thrown, if the compiler encounters an illegal situation.ProgramInvocationException - Thrown, if the program could not be instantiated from its jar file.public JobGraph getJobGraph(PackagedProgram prog, OptimizedPlan optPlan) throws ProgramInvocationException
ProgramInvocationExceptionpublic JobExecutionResult run(PackagedProgram prog, int parallelism, boolean wait) throws ProgramInvocationException
ProgramInvocationExceptionpublic JobExecutionResult run(PackagedProgram prog, OptimizedPlan optimizedPlan, boolean wait) throws ProgramInvocationException
ProgramInvocationExceptionpublic JobExecutionResult run(JobWithJars prog, int parallelism, boolean wait) throws CompilerException, ProgramInvocationException
prog - The program to be executed.wait - A flag that indicates whether this function call should block until the program execution is done.CompilerException - Thrown, if the compiler encounters an illegal situation.ProgramInvocationException - Thrown, if the program could not be instantiated from its jar file,
or if the submission failed. That might be either due to an I/O problem,
i.e. the job-manager is unreachable, or due to the fact that the execution
on the nephele system failed.JobInstantiationException - Thrown, if the plan assembler function causes an exception.public JobExecutionResult run(OptimizedPlan compiledPlan, List<File> libraries, boolean wait) throws ProgramInvocationException
ProgramInvocationExceptionpublic JobExecutionResult run(JobGraph jobGraph, boolean wait) throws ProgramInvocationException
ProgramInvocationExceptionCopyright © 2013–2014. All rights reserved.