public class BasicDeleteTaskExecutor extends Object implements TaskExecutor
TaskExecutor for DeleteTaskInfo.
This implementation does not support Hadoop file system. To support Hadoop file systems, please inherit
this class and override deleteOnHadoopFileSystem(TaskExecutionContext, String).| Constructor and Description |
|---|
BasicDeleteTaskExecutor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
deleteOnHadoopFileSystem(TaskExecutionContext context,
String path)
Delete files on Hadoop file system.
|
protected void |
deleteOnLocalFileSystem(TaskExecutionContext context,
String path)
Delete files on local file system.
|
void |
execute(TaskExecutionContext context,
TaskInfo task)
Executes a task.
|
boolean |
isSupported(TaskExecutionContext context,
TaskInfo task)
Returns whether this executor supports executing the target task.
|
public boolean isSupported(TaskExecutionContext context, TaskInfo task)
TaskExecutorisSupported in interface TaskExecutorcontext - the current contexttask - the target tasktrue if this supports the target task, otherwise falsepublic void execute(TaskExecutionContext context, TaskInfo task) throws IOException, InterruptedException
TaskExecutorexecute in interface TaskExecutorcontext - the current contexttask - the target taskIOException - if task execution was failedInterruptedException - if interrupted while executing the taskprotected void deleteOnLocalFileSystem(TaskExecutionContext context, String path) throws IOException, InterruptedException
context - the current contextpath - the target pathIOException - if I/O error was occurred while deleting filesInterruptedException - if interrupted while deleting filesprotected void deleteOnHadoopFileSystem(TaskExecutionContext context, String path) throws IOException, InterruptedException
context - the current contextpath - the target pathIOException - if I/O error was occurred while deleting filesInterruptedException - if interrupted while deleting filesCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.