Class DiskBalancerWorkStatus.DiskBalancerWorkEntry

java.lang.Object
org.apache.hadoop.hdfs.server.datanode.DiskBalancerWorkStatus.DiskBalancerWorkEntry
Enclosing class:
DiskBalancerWorkStatus

public static class DiskBalancerWorkStatus.DiskBalancerWorkEntry extends Object
A class that is used to report each work item that we are working on. This class describes the Source, Destination and how much data has been already moved, errors encountered etc. This is useful for the disk balancer stats as well as the queryStatus RPC.
  • Constructor Details

    • DiskBalancerWorkEntry

      public DiskBalancerWorkEntry()
      Constructor needed for json serialization.
    • DiskBalancerWorkEntry

      public DiskBalancerWorkEntry(String workItem) throws IOException
      Throws:
      IOException
    • DiskBalancerWorkEntry

      public DiskBalancerWorkEntry(String sourcePath, String destPath, DiskBalancerWorkItem workItem)
      Constructs a Work Entry class.
      Parameters:
      sourcePath - - Source Path where we are moving data from.
      destPath - - Destination path to where we are moving data to.
      workItem - - Current work status of this move.
  • Method Details

    • getSourcePath

      public String getSourcePath()
      Returns the source path.
      Returns:
      - Source path
    • setSourcePath

      public void setSourcePath(String sourcePath)
      Sets the Source Path.
      Parameters:
      sourcePath - - Volume Path.
    • getDestPath

      public String getDestPath()
      Gets the Destination path.
      Returns:
      - Path
    • setDestPath

      public void setDestPath(String destPath)
      Sets the destination path.
      Parameters:
      destPath - - Path
    • getWorkItem

      public DiskBalancerWorkItem getWorkItem()
      Gets the current status of work for these volumes.
      Returns:
      - Work Item
    • setWorkItem

      public void setWorkItem(DiskBalancerWorkItem workItem)
      Sets the work item.
      Parameters:
      workItem - - sets the work item information