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:
  • Field Details

  • 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

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Overrides:
      writeTo in class ReplicationTimer
      Throws:
      IOException
    • fileDetails

    • reset

      public void reset()
      Overrides:
      reset in class ReplicationTimer
    • addFileDetail

      public void addFileDetail(String name, long length, boolean reused)
    • setFileDetailsComplete

      public void setFileDetailsComplete()
    • addRecoveredBytesToFile

      public void addRecoveredBytesToFile(String name, long bytes)
    • 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() minus recoveredBytes(), 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 interface org.opensearch.core.xcontent.ToXContent
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFileDetails

      public ReplicationLuceneIndex.FileMetadata getFileDetails(String dest)