Interface DiskBalancer.BlockMover

All Known Implementing Classes:
DiskBalancer.DiskBalancerMover
Enclosing class:
DiskBalancer

public static interface DiskBalancer.BlockMover
BlockMover supports moving blocks across Volumes.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copyBlocks(DiskBalancer.VolumePair pair, org.apache.hadoop.hdfs.server.datanode.DiskBalancerWorkItem item)
    Copies blocks from a set of volumes.
    Returns a pointer to the current dataset we are operating against.
    long
    Number of seconds elapsed.
    long
    Returns time when this plan started executing.
    void
    Tells copyBlocks to exit from the copy routine.
    void
    Begin the actual copy operations.
  • Method Details

    • copyBlocks

      void copyBlocks(DiskBalancer.VolumePair pair, org.apache.hadoop.hdfs.server.datanode.DiskBalancerWorkItem item)
      Copies blocks from a set of volumes.
      Parameters:
      pair - - Source and Destination Volumes.
      item - - Number of bytes to move from volumes.
    • setRunnable

      void setRunnable()
      Begin the actual copy operations. This is useful in testing.
    • setExitFlag

      void setExitFlag()
      Tells copyBlocks to exit from the copy routine.
    • getDataset

      FsDatasetSpi getDataset()
      Returns a pointer to the current dataset we are operating against.
      Returns:
      FsDatasetSpi
    • getStartTime

      long getStartTime()
      Returns time when this plan started executing.
      Returns:
      Start time in milliseconds.
    • getElapsedSeconds

      long getElapsedSeconds()
      Number of seconds elapsed.
      Returns:
      time in seconds