Class DiskBalancerWorkStatus.DiskBalancerWorkEntry
java.lang.Object
org.apache.hadoop.hdfs.server.datanode.DiskBalancerWorkStatus.DiskBalancerWorkEntry
- Enclosing class:
- DiskBalancerWorkStatus
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 Summary
ConstructorsConstructorDescriptionConstructor needed for json serialization.DiskBalancerWorkEntry(String workItem) DiskBalancerWorkEntry(String sourcePath, String destPath, DiskBalancerWorkItem workItem) Constructs a Work Entry class. -
Method Summary
Modifier and TypeMethodDescriptionGets the Destination path.Returns the source path.Gets the current status of work for these volumes.voidsetDestPath(String destPath) Sets the destination path.voidsetSourcePath(String sourcePath) Sets the Source Path.voidsetWorkItem(DiskBalancerWorkItem workItem) Sets the work item.
-
Constructor Details
-
DiskBalancerWorkEntry
public DiskBalancerWorkEntry()Constructor needed for json serialization. -
DiskBalancerWorkEntry
- Throws:
IOException
-
DiskBalancerWorkEntry
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
Returns the source path.- Returns:
- - Source path
-
setSourcePath
Sets the Source Path.- Parameters:
sourcePath- - Volume Path.
-
getDestPath
Gets the Destination path.- Returns:
- - Path
-
setDestPath
Sets the destination path.- Parameters:
destPath- - Path
-
getWorkItem
Gets the current status of work for these volumes.- Returns:
- - Work Item
-
setWorkItem
Sets the work item.- Parameters:
workItem- - sets the work item information
-