@Private
@Evolving
public class ReplaceDatanodeOnFailure
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ReplaceDatanodeOnFailure.Policy |
The replacement policies
|
| Constructor | Description |
|---|---|
ReplaceDatanodeOnFailure(ReplaceDatanodeOnFailure.Policy policy,
boolean bestEffort) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
checkEnabled() |
Check if the feature is enabled.
|
static ReplaceDatanodeOnFailure |
get(org.apache.hadoop.conf.Configuration conf) |
Get the setting from configuration.
|
boolean |
isBestEffort() |
Best effort means that the client will try to replace the failed datanode
(provided that the policy is satisfied), however, it will continue the
write operation in case that the datanode replacement also fails.
|
boolean |
satisfy(short replication,
DatanodeInfo[] existings,
boolean isAppend,
boolean isHflushed) |
Does it need a replacement according to the policy?
|
java.lang.String |
toString() |
|
static void |
write(ReplaceDatanodeOnFailure.Policy policy,
boolean bestEffort,
org.apache.hadoop.conf.Configuration conf) |
Write the setting to configuration.
|
public ReplaceDatanodeOnFailure(ReplaceDatanodeOnFailure.Policy policy, boolean bestEffort)
public void checkEnabled()
public boolean isBestEffort()
public boolean satisfy(short replication,
DatanodeInfo[] existings,
boolean isAppend,
boolean isHflushed)
public java.lang.String toString()
toString in class java.lang.Objectpublic static ReplaceDatanodeOnFailure get(org.apache.hadoop.conf.Configuration conf)
public static void write(ReplaceDatanodeOnFailure.Policy policy, boolean bestEffort, org.apache.hadoop.conf.Configuration conf)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.