public class LocalExecutor extends PlanExecutor
Plan on a local embedded Stratosphere instance.| Constructor and Description |
|---|
LocalExecutor() |
| Modifier and Type | Method and Description |
|---|---|
static JobExecutionResult |
execute(Plan plan)
Executes the program represented by the given Pact plan.
|
static JobExecutionResult |
execute(Program pa,
String... args)
Executes the program described by the given plan assembler.
|
JobExecutionResult |
executePlan(Plan plan)
Execute the given plan on the local Nephele instance, wait for the job to
finish and return the runtime in milliseconds.
|
String |
getConfigDir() |
String |
getHdfsConfig() |
int |
getJobManagerRpcPort() |
String |
getOptimizerPlanAsJSON(Plan plan)
Returns a JSON dump of the optimized plan.
|
static String |
getPlanAsJSON(Plan plan)
Return unoptimized plan as JSON.
|
int |
getTaskManagerDataPort() |
int |
getTaskManagerRpcPort() |
boolean |
isDefaultAlwaysCreateDirectory() |
boolean |
isDefaultOverwriteFiles() |
static String |
optimizerPlanAsJSON(Plan plan)
Returns a JSON dump of the optimized plan.
|
void |
setConfigDir(String configDir) |
void |
setDefaultAlwaysCreateDirectory(boolean defaultAlwaysCreateDirectory) |
void |
setDefaultOverwriteFiles(boolean defaultOverwriteFiles) |
void |
setHdfsConfig(String hdfsConfig) |
void |
setJobManagerRpcPort(int jobManagerRpcPort) |
static void |
setLoggingLevel(org.apache.log4j.Level lvl)
Utility method for logging
|
static void |
setOverwriteFilesByDefault(boolean overwriteByDefault)
By default, local environments do not overwrite existing files.
|
void |
setTaskManagerDataPort(int taskManagerDataPort) |
void |
setTaskManagerRpcPort(int taskManagerRpcPort) |
void |
start() |
void |
stop()
Stop the local executor instance.
|
createLocalExecutor, createRemoteExecutorpublic int getJobManagerRpcPort()
public void setJobManagerRpcPort(int jobManagerRpcPort)
public int getTaskManagerRpcPort()
public void setTaskManagerRpcPort(int taskManagerRpcPort)
public int getTaskManagerDataPort()
public void setTaskManagerDataPort(int taskManagerDataPort)
public String getConfigDir()
public void setConfigDir(String configDir)
public String getHdfsConfig()
public void setHdfsConfig(String hdfsConfig)
public boolean isDefaultOverwriteFiles()
public void setDefaultOverwriteFiles(boolean defaultOverwriteFiles)
public boolean isDefaultAlwaysCreateDirectory()
public void setDefaultAlwaysCreateDirectory(boolean defaultAlwaysCreateDirectory)
public void stop()
throws Exception
Exceptionpublic JobExecutionResult executePlan(Plan plan) throws Exception
executePlan in class PlanExecutorplan - The plan of the program to execute.Exception - Thrown, if either the startup of the local execution context, or the execution
caused an exception.public String getOptimizerPlanAsJSON(Plan plan) throws Exception
getOptimizerPlanAsJSON in class PlanExecutorplan - The program's plan.Exceptionpublic static JobExecutionResult execute(Program pa, String... args) throws Exception
pa - The program's plan assembler.args - The parameters.Exception - Thrown, if either the startup of the local execution context, or the execution
caused an exception.public static JobExecutionResult execute(Plan plan) throws Exception
pa - The program's plan.Exception - Thrown, if either the startup of the local execution context, or the execution
caused an exception.public static String optimizerPlanAsJSON(Plan plan) throws Exception
plan - The program's plan.Exceptionpublic static String getPlanAsJSON(Plan plan)
public static void setLoggingLevel(org.apache.log4j.Level lvl)
public static void setOverwriteFilesByDefault(boolean overwriteByDefault)
LocalEnvironment.overwriteByDefault - True to overwrite by default, false to not overwrite by default.Copyright © 2013–2014. All rights reserved.