RetriableDirectoryCreateCommand, RetriableFileCopyCommandpublic abstract class RetriableCommand
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
protected java.lang.String |
description |
| Constructor | Description |
|---|---|
RetriableCommand(java.lang.String description) |
Constructor.
|
RetriableCommand(java.lang.String description,
org.apache.hadoop.io.retry.RetryPolicy retryPolicy) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract java.lang.Object |
doExecute(java.lang.Object... arguments) |
Implement this interface-method define the command-logic that will be
retried on failure (i.e.
|
java.lang.Object |
execute(java.lang.Object... arguments) |
The execute() method invokes doExecute() until either:
1.
|
RetriableCommand |
setRetryPolicy(org.apache.hadoop.io.retry.RetryPolicy retryHandler) |
Fluent-interface to change the RetryHandler.
|
public RetriableCommand(java.lang.String description)
description - The human-readable description of the command.public RetriableCommand(java.lang.String description,
org.apache.hadoop.io.retry.RetryPolicy retryPolicy)
description - The human-readable description of the command.retryPolicy - The RetryHandler to be used to compute retries.protected abstract java.lang.Object doExecute(java.lang.Object... arguments)
throws java.lang.Exception
arguments - Argument-list to the command.java.lang.Exception - Throws Exception on complete failure.public java.lang.Object execute(java.lang.Object... arguments)
throws java.lang.Exception
arguments - The list of arguments for the command.java.lang.Exceptionpublic RetriableCommand setRetryPolicy(org.apache.hadoop.io.retry.RetryPolicy retryHandler)
retryHandler - The new RetryHandler instance to be used.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.