org.apache.hadoop.io.Writablepublic class DistCpProcedure extends BalanceProcedure
| Modifier and Type | Class | Description |
|---|---|---|
static class |
DistCpProcedure.Stage |
BalanceProcedure.RetryException| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Constructor | Description |
|---|---|
DistCpProcedure() |
|
DistCpProcedure(java.lang.String name,
java.lang.String nextProcedure,
long delayDuration,
FedBalanceContext context) |
The constructor of DistCpProcedure.
|
| Modifier and Type | Method | Description |
|---|---|---|
static void |
disableForTest() |
|
protected void |
disableWrite(FedBalanceContext fbcontext) |
Disable write by cancelling the execute permission of the source path.
|
static void |
enableForTest() |
|
protected void |
enableWrite() |
Enable write.
|
boolean |
execute() |
The main process.
|
void |
readFields(java.io.DataInput in) |
|
protected void |
updateStage(DistCpProcedure.Stage value) |
|
void |
write(java.io.DataOutput out) |
delayMillisBeforeRetry, equals, hashCode, isSchedulerShutdown, name, nextProcedure, setNextProcedure, toStringpublic DistCpProcedure()
public DistCpProcedure(java.lang.String name,
java.lang.String nextProcedure,
long delayDuration,
FedBalanceContext context)
throws java.io.IOException
name - the name of the procedure.nextProcedure - the name of the next procedure.delayDuration - the delay duration when this procedure is delayed.context - the federation balance context.java.io.IOExceptionpublic static void enableForTest()
public static void disableForTest()
public boolean execute()
throws BalanceProcedure.RetryException,
java.io.IOException
BalanceProcedureexecute in class BalanceProcedureBalanceProcedure.RetryException - if this procedure needs delay a while then retry.java.io.IOExceptionprotected void disableWrite(FedBalanceContext fbcontext) throws java.io.IOException
fbcontext - the context.java.io.IOException - if can't disable write.protected void enableWrite()
throws java.io.IOException
java.io.IOException - if can't enable write.@VisibleForTesting protected void updateStage(DistCpProcedure.Stage value)
public void write(java.io.DataOutput out)
throws java.io.IOException
write in interface org.apache.hadoop.io.Writablewrite in class BalanceProcedurejava.io.IOExceptionpublic void readFields(java.io.DataInput in)
throws java.io.IOException
readFields in interface org.apache.hadoop.io.WritablereadFields in class BalanceProcedurejava.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.