public abstract class AbstractDistributedJobCommand extends AbstractFileSystemCommand
Command
classes.
It provides handling for submitting multiple jobs and handling retries of them.Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.cli.Option |
ASYNC_OPTION |
protected static int |
DEFAULT_ACTIVE_JOBS |
protected int |
mActiveJobs |
protected JobMasterClient |
mClient |
protected List<JobAttempt> |
mSubmittedJobAttempts |
mFileSystem, mFsContext
Modifier | Constructor and Description |
---|---|
protected |
AbstractDistributedJobCommand(FileSystemContext fsContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
drain() |
int |
getCompletedCmdCount()
Gets the number of completed commands.
|
int |
getCompletedCount()
Gets the number of completed jobs.
|
int |
getFailedCmdCount()
Gets the number of failed commands.
|
int |
getFailedCount()
Gets the number of failed jobs.
|
Set<String> |
getFailedFiles()
Gets failed files.
|
void |
postProcessing(long jobControlId)
Do post-processing on the command information, including printing
file paths and statistics.
|
protected void |
processFailures(String arg,
Set<String> failures,
String logFileLocation) |
protected long |
submit(CmdConfig cmdConfig) |
void |
waitForCmd(long jobControlId)
Waits for command to complete.
|
protected void |
waitJob()
Waits for at least one job to complete.
|
processHeader, runPlainPath, runWildCardCmd
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getCommandName, getDescription, getOptions, getSubCommands, getUsage, hasSubCommand, parseAndValidateArgs, run, validateArgs
protected static final int DEFAULT_ACTIVE_JOBS
protected static final org.apache.commons.cli.Option ASYNC_OPTION
protected List<JobAttempt> mSubmittedJobAttempts
protected int mActiveJobs
protected final JobMasterClient mClient
protected AbstractDistributedJobCommand(FileSystemContext fsContext)
protected void drain()
protected long submit(CmdConfig cmdConfig)
protected void waitJob()
public void waitForCmd(long jobControlId)
jobControlId
- public void postProcessing(long jobControlId)
jobControlId
- protected void processFailures(String arg, Set<String> failures, String logFileLocation)
public int getCompletedCount()
public int getFailedCount()
public int getFailedCmdCount()
public int getCompletedCmdCount()
Copyright © 2023. All Rights Reserved.