Class MountTableProcedure
java.lang.Object
org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure
org.apache.hadoop.hdfs.rbfbalance.MountTableProcedure
- All Implemented Interfaces:
org.apache.hadoop.io.Writable
public class MountTableProcedure
extends org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure
Update mount table.
Old mount table:
/a/b/c -> {ns:src path:/a/b/c}
New mount table:
/a/b/c -> {ns:dst path:/a/b/c}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure
org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure.RetryException -
Field Summary
Fields inherited from class org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute()static MountTablegetMountEntry(String mount, MountTableManager mountTable) Gets the mount table entry.voidreadFields(DataInput in) voidwrite(DataOutput out) Methods inherited from class org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure
delayMillisBeforeRetry, equals, hashCode, isSchedulerShutdown, name, nextProcedure, setNextProcedure, toString
-
Constructor Details
-
MountTableProcedure
public MountTableProcedure() -
MountTableProcedure
public MountTableProcedure(String name, String nextProcedure, long delayDuration, String mount, String dstPath, String dstNs, org.apache.hadoop.conf.Configuration conf) Update mount entry to specified dst uri.- Parameters:
name- the name of the procedure.nextProcedure- the name of the next procedure.delayDuration- the delay duration when this procedure is delayed.mount- the mount entry to be updated.dstPath- the sub-cluster uri of the dst path.dstNs- the destination sub-cluster name service id.conf- the configuration.
-
-
Method Details
-
execute
public boolean execute() throws org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure.RetryException, IOException- Specified by:
executein classorg.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure- Throws:
org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure.RetryExceptionIOException
-
getMountEntry
public static MountTable getMountEntry(String mount, MountTableManager mountTable) throws IOException Gets the mount table entry.- Parameters:
mount- name of the mount entry.mountTable- the mount table.- Returns:
- corresponding mount entry.
- Throws:
IOException- in case of failure to retrieve mount entry.
-
write
- Specified by:
writein interfaceorg.apache.hadoop.io.Writable- Overrides:
writein classorg.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure- Throws:
IOException
-
readFields
- Specified by:
readFieldsin interfaceorg.apache.hadoop.io.Writable- Overrides:
readFieldsin classorg.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure- Throws:
IOException
-