@Private
@Unstable
public class DiskBalancerWorkItem
extends java.lang.Object
| Constructor | Description |
|---|---|
DiskBalancerWorkItem() |
Empty constructor for Json serialization.
|
DiskBalancerWorkItem(long bytesToCopy,
long bytesCopied) |
Constructs a DiskBalancerWorkItem.
|
| Modifier and Type | Method | Description |
|---|---|---|
long |
getBandwidth() |
Max disk bandwidth to use.
|
long |
getBlocksCopied() |
Returns number of blocks copied for this DiskBalancerWorkItem.
|
long |
getBytesCopied() |
Returns bytes copied so far.
|
long |
getBytesToCopy() |
Returns bytes to copy.
|
java.lang.String |
getErrMsg() |
Gets the error message.
|
long |
getErrorCount() |
Returns the number of errors encountered.
|
long |
getMaxDiskErrors() |
Gets maximum disk errors to tolerate before we fail this copy step.
|
long |
getSecondsElapsed() |
Gets the number of seconds elapsed from the start time.
|
long |
getStartTime() |
Records the Start time of execution.
|
long |
getTolerancePercent() |
Allowed deviation from ideal storage in percentage.
|
void |
incBlocksCopied() |
increments the number of blocks copied.
|
void |
incCopiedSoFar(long delta) |
Increments bytesCopied by delta.
|
void |
incErrorCount() |
Incs Error Count.
|
static DiskBalancerWorkItem |
parseJson(java.lang.String json) |
Reads a DiskBalancerWorkItem Object from a Json String.
|
void |
setBandwidth(long bandwidth) |
Sets max disk bandwidth to use, in MBs per second.
|
void |
setBlocksCopied(long blocksCopied) |
Number of blocks copied so far.
|
void |
setBytesCopied(long bytesCopied) |
Sets bytes copied so far.
|
void |
setErrMsg(java.lang.String errMsg) |
Sets the error message.
|
void |
setErrorCount(long errorCount) |
Sets the Error counts for this step.
|
void |
setMaxDiskErrors(long maxDiskErrors) |
Sets maximum disk errors to tolerate before we fail this copy step.
|
void |
setSecondsElapsed(long secondsElapsed) |
Sets number of seconds elapsed.
|
void |
setStartTime(long startTime) |
Sets the Start time.
|
void |
setTolerancePercent(long tolerancePercent) |
Sets the tolerance percentage.
|
java.lang.String |
toJson() |
returns a serialized json string.
|
public DiskBalancerWorkItem()
public DiskBalancerWorkItem(long bytesToCopy,
long bytesCopied)
bytesToCopy - - Total bytes to copy from a diskbytesCopied - - Copied So far.public static DiskBalancerWorkItem parseJson(java.lang.String json) throws java.io.IOException
json - - Json String.java.io.IOExceptionpublic java.lang.String getErrMsg()
public void setErrMsg(java.lang.String errMsg)
errMsg - - Msg.public long getErrorCount()
public void incErrorCount()
public long getBytesCopied()
public void setBytesCopied(long bytesCopied)
bytesCopied - - longpublic void incCopiedSoFar(long delta)
delta - - longpublic long getBytesToCopy()
public long getBlocksCopied()
public void incBlocksCopied()
public java.lang.String toJson()
throws java.io.IOException
java.io.IOExceptionpublic void setErrorCount(long errorCount)
errorCount - long.public void setBlocksCopied(long blocksCopied)
blocksCopied - Blocks copied.public long getMaxDiskErrors()
public void setMaxDiskErrors(long maxDiskErrors)
maxDiskErrors - longpublic long getTolerancePercent()
public void setTolerancePercent(long tolerancePercent)
tolerancePercent - - tolerance.public long getBandwidth()
public void setBandwidth(long bandwidth)
bandwidth - - long.public long getStartTime()
public void setStartTime(long startTime)
startTime - - Time stamp for start of execution.public long getSecondsElapsed()
public void setSecondsElapsed(long secondsElapsed)
secondsElapsed - - seconds elapsed.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.