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
    Constructor
    Description
     
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    static MountTable
    Gets the mount table entry.
    void
     
    void
     

    Methods inherited from class org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure

    delayMillisBeforeRetry, equals, hashCode, isSchedulerShutdown, name, nextProcedure, setNextProcedure, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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:
      execute in class org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure
      Throws:
      org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure.RetryException
      IOException
    • 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

      public void write(DataOutput out) throws IOException
      Specified by:
      write in interface org.apache.hadoop.io.Writable
      Overrides:
      write in class org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure
      Throws:
      IOException
    • readFields

      public void readFields(DataInput in) throws IOException
      Specified by:
      readFields in interface org.apache.hadoop.io.Writable
      Overrides:
      readFields in class org.apache.hadoop.tools.fedbalance.procedure.BalanceProcedure
      Throws:
      IOException