Module org.elasticsearch.server
Class RecoveryState.Index
java.lang.Object
org.elasticsearch.indices.recovery.RecoveryState.Timer
org.elasticsearch.indices.recovery.RecoveryState.Index
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentFragment
- Enclosing class:
RecoveryState
public static class RecoveryState.Index
extends RecoveryState.Timer
implements ToXContentFragment, Writeable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final RecoveryState.RecoveryFilesDetailsstatic final longFields inherited from class org.elasticsearch.indices.recovery.RecoveryState.Timer
startNanoTime, startTime, stopTime, timeFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionIndex()Index(StreamInput in) Index(RecoveryState.RecoveryFilesDetails recoveryFilesDetails) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFileDetail(String name, long length, boolean reused) voidaddRecoveredBytesToFile(String name, long bytes) voidaddRecoveredFromSnapshotBytesToFile(String name, long bytes) voidaddSourceThrottling(long timeInNanos) voidaddTargetThrottling(long timeInNanos) longgetFileDetails(String dest) longtotal number of bytes recovered so far, including both existing and reusedfloatpercent of bytes recovered out of total files bytes *to be* recoveredintnumber of file that were recovered (excluding on ongoing files)floatpercent of recovered (i.e., not reused) files out of the total files to be recoveredlongvoidreset()voidlongintvoidtoString()longtotal number of bytes in th shardinttotal number of files that are part of this recovery, both re-used and recoveredlongtotal bytes of files to be recovered (potentially not yet done)inttotal number of files to be recovered (potentially not yet done)toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.indices.recovery.RecoveryState.Timer
getStartNanoTime, start, startTime, stop, stopTime, timeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
fileDetails
-
UNKNOWN
public static final long UNKNOWN- See Also:
-
-
Constructor Details
-
Index
public Index() -
Index
-
Index
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classRecoveryState.Timer- Throws:
IOException
-
fileDetails
-
reset
public void reset()- Overrides:
resetin classRecoveryState.Timer
-
addFileDetail
-
setFileDetailsComplete
public void setFileDetailsComplete() -
addRecoveredBytesToFile
-
resetRecoveredBytesOfFile
-
addRecoveredFromSnapshotBytesToFile
-
addSourceThrottling
public void addSourceThrottling(long timeInNanos) -
addTargetThrottling
public void addTargetThrottling(long timeInNanos) -
sourceThrottling
-
targetThrottling
-
totalFileCount
public int totalFileCount()total number of files that are part of this recovery, both re-used and recovered -
totalRecoverFiles
public int totalRecoverFiles()total number of files to be recovered (potentially not yet done) -
recoveredFileCount
public int recoveredFileCount()number of file that were recovered (excluding on ongoing files) -
recoveredFilesPercent
public float recoveredFilesPercent()percent of recovered (i.e., not reused) files out of the total files to be recovered -
totalBytes
public long totalBytes()total number of bytes in th shard -
recoveredBytes
public long recoveredBytes()total number of bytes recovered so far, including both existing and reused -
recoveredFromSnapshotBytes
public long recoveredFromSnapshotBytes() -
totalRecoverBytes
public long totalRecoverBytes()total bytes of files to be recovered (potentially not yet done) -
bytesStillToRecover
public long bytesStillToRecover()- Returns:
- number of bytes still to recover, i.e.
totalRecoverBytes()minusrecoveredBytes(), or-1if the full set of files to recover is not yet known
-
recoveredBytesPercent
public float recoveredBytesPercent()percent of bytes recovered out of total files bytes *to be* recovered -
reusedFileCount
public int reusedFileCount() -
reusedBytes
public long reusedBytes() -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
toString
-
getFileDetails
-