@InterfaceAudience.Private public interface SplitLogManagerCoordination
prepareTask(java.lang.String) and submit it by
submitTask(String). After that it periodically check the number of remaining tasks by
remainingTasksInCoordination() and waits until it become zero.
Methods required for task life circle:
checkTaskStillAvailable(String) Check that task is still there
checkTasks() check for unassigned tasks and resubmit them
| Modifier and Type | Interface and Description |
|---|---|
static class |
SplitLogManagerCoordination.SplitLogManagerDetails
Detail class that shares data between coordination and split log manager
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkTasks()
tells Coordination that it should check for new tasks
|
void |
checkTaskStillAvailable(String task)
Check that the task is still there
|
void |
deleteTask(String taskName) |
SplitLogManagerCoordination.SplitLogManagerDetails |
getDetails()
Returns the configuration that was provided previously
|
void |
init()
Support method to init constants such as timeout.
|
String |
prepareTask(String taskName)
Prepare the new task
|
int |
remainingTasksInCoordination()
Return the number of remaining tasks
|
boolean |
resubmitTask(String taskName,
SplitLogManager.Task task,
SplitLogManager.ResubmitDirective force)
Resubmit the task in case if found unassigned or failed
|
void |
setDetails(SplitLogManagerCoordination.SplitLogManagerDetails details)
Provide the configuration from the SplitLogManager
|
void |
submitTask(String taskName) |
void setDetails(SplitLogManagerCoordination.SplitLogManagerDetails details)
SplitLogManagerCoordination.SplitLogManagerDetails getDetails()
String prepareTask(String taskName)
taskName - name of the taskvoid checkTasks()
int remainingTasksInCoordination()
void checkTaskStillAvailable(String task)
task - node to checkboolean resubmitTask(String taskName, SplitLogManager.Task task, SplitLogManager.ResubmitDirective force)
taskName - path related to tasktask - to resubmitforce - whether it should be forcedvoid submitTask(String taskName)
taskName - to be submittedvoid deleteTask(String taskName)
taskName - to be removedvoid init() throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.