Module org.elasticsearch.server
Package org.elasticsearch.index.store
Class Store.VerifyingIndexInput
java.lang.Object
org.apache.lucene.store.DataInput
org.apache.lucene.store.IndexInput
org.apache.lucene.store.ChecksumIndexInput
org.elasticsearch.index.store.Store.VerifyingIndexInput
- All Implemented Interfaces:
Closeable,AutoCloseable,Cloneable
- Enclosing class:
Store
public static class Store.VerifyingIndexInput
extends org.apache.lucene.store.ChecksumIndexInput
Index input that calculates checksum as data is read from the input.
This class supports random access (it is possible to seek backward and forward) in order to accommodate retry mechanism that is used in some repository plugins (S3 for example). However, the checksum is only calculated on the first read. All consecutive reads of the same data are not used to calculate the checksum.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.lucene.store.IndexInput
getFullSliceDescription, isLoaded, prefetch, randomAccessSlice, skipBytes, slice, toString, updateReadAdviceMethods inherited from class org.apache.lucene.store.DataInput
readBytes, readFloats, readGroupVInt, readInt, readInts, readLong, readLongs, readMapOfStrings, readSetOfStrings, readShort, readString, readVInt, readVLong, readZInt, readZLong
-
Constructor Details
-
VerifyingIndexInput
public VerifyingIndexInput(org.apache.lucene.store.IndexInput input)
-
-
Method Details
-
readByte
- Specified by:
readBytein classorg.apache.lucene.store.DataInput- Throws:
IOException
-
readBytes
- Specified by:
readBytesin classorg.apache.lucene.store.DataInput- Throws:
IOException
-
getChecksum
public long getChecksum()- Specified by:
getChecksumin classorg.apache.lucene.store.ChecksumIndexInput
-
seek
- Overrides:
seekin classorg.apache.lucene.store.ChecksumIndexInput- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.lucene.store.IndexInput- Throws:
IOException
-
getFilePointer
public long getFilePointer()- Specified by:
getFilePointerin classorg.apache.lucene.store.IndexInput
-
length
public long length()- Specified by:
lengthin classorg.apache.lucene.store.IndexInput
-
clone
public org.apache.lucene.store.IndexInput clone()- Overrides:
clonein classorg.apache.lucene.store.IndexInput
-
slice
public org.apache.lucene.store.IndexInput slice(String sliceDescription, long offset, long length) throws IOException - Specified by:
slicein classorg.apache.lucene.store.IndexInput- Throws:
IOException
-
getStoredChecksum
public long getStoredChecksum() -
verify
public long verify() throws org.apache.lucene.index.CorruptIndexException- Throws:
org.apache.lucene.index.CorruptIndexException
-