Class ReplicationLuceneIndex
java.lang.Object
org.opensearch.indices.replication.common.ReplicationTimer
org.opensearch.indices.replication.common.ReplicationLuceneIndex
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable
,org.opensearch.core.xcontent.ToXContent
,org.opensearch.core.xcontent.ToXContentFragment
@PublicApi(since="1.0.0")
public final class ReplicationLuceneIndex
extends ReplicationTimer
implements org.opensearch.core.xcontent.ToXContentFragment, org.opensearch.core.common.io.stream.Writeable
Represents the Lucene Index (set of files on a single shard) involved
in the replication process.
- Opensearch.api:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Metadata about a fileNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionReplicationLuceneIndex
(org.opensearch.core.common.io.stream.StreamInput in) ReplicationLuceneIndex
(org.opensearch.indices.replication.common.ReplicationLuceneIndex.FilesDetails filesDetails) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFileDetail
(String name, long length, boolean reused) void
addRecoveredBytesToFile
(String name, long bytes) void
addSourceThrottling
(long timeInNanos) void
addTargetThrottling
(long timeInNanos) long
getFileDetails
(String dest) long
total number of bytes recovered so far, including both existing and reusedfloat
percent of bytes recovered out of total files bytes *to be* recoveredint
number of file that were recovered (excluding on ongoing files)float
percent of recovered (i.e., not reused) files out of the total files to be recoveredvoid
reset()
long
int
void
org.opensearch.common.unit.TimeValue
org.opensearch.common.unit.TimeValue
toString()
long
total number of bytes in th shardint
total number of files that are part of this recovery, both re-used and recoveredlong
total bytes of files to be recovered (potentially not yet done)int
total number of files to be recovered (potentially not yet done)org.opensearch.core.xcontent.XContentBuilder
toXContent
(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) void
writeTo
(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class org.opensearch.indices.replication.common.ReplicationTimer
getStartNanoTime, start, startTime, stop, stopTime, time
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Field Details
-
UNKNOWN
public static final long UNKNOWN- See Also:
-
-
Constructor Details
-
ReplicationLuceneIndex
public ReplicationLuceneIndex() -
ReplicationLuceneIndex
public ReplicationLuceneIndex(org.opensearch.indices.replication.common.ReplicationLuceneIndex.FilesDetails filesDetails) -
ReplicationLuceneIndex
public ReplicationLuceneIndex(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeTo
in interfaceorg.opensearch.core.common.io.stream.Writeable
- Overrides:
writeTo
in classReplicationTimer
- Throws:
IOException
-
fileDetails
-
reset
public void reset()- Overrides:
reset
in classReplicationTimer
-
addFileDetail
-
setFileDetailsComplete
public void setFileDetailsComplete() -
addRecoveredBytesToFile
-
addSourceThrottling
public void addSourceThrottling(long timeInNanos) -
addTargetThrottling
public void addTargetThrottling(long timeInNanos) -
sourceThrottling
public org.opensearch.common.unit.TimeValue sourceThrottling() -
targetThrottling
public org.opensearch.common.unit.TimeValue 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 -
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-1
if 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 org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.core.xcontent.ToXContent
- Throws:
IOException
-
toString
-
getFileDetails
-