Package org.apache.lucene.store

Examples of org.apache.lucene.store.ChecksumIndexInput.seek()


  public static long checksumEntireFile(IndexInput input) throws IOException {
    IndexInput clone = input.clone();
    clone.seek(0);
    ChecksumIndexInput in = new BufferedChecksumIndexInput(clone);
    assert in.getFilePointer() == 0;
    in.seek(in.length() - footerLength());
    return checkFooter(in);
  }
}
View Full Code Here


  public static long checksumEntireFile(IndexInput input) throws IOException {
    IndexInput clone = input.clone();
    clone.seek(0);
    ChecksumIndexInput in = new BufferedChecksumIndexInput(clone);
    assert in.getFilePointer() == 0;
    in.seek(in.length() - footerLength());
    return checkFooter(in);
  }
}
View Full Code Here

        for (int i = nextLiveDoc(0, liveDocs, maxDoc); i < maxDoc; ) {
          // We make sure to move the checksum input in any case, otherwise the final
          // integrity check might need to read the whole file a second time
          final long startPointer = index.getStartPointer(i);
          if (startPointer > vectorsStream.getFilePointer()) {
            vectorsStream.seek(startPointer);
          }
          if (pendingDocs.isEmpty()
              && (i == 0 || index.getStartPointer(i - 1) < startPointer)) { // start of a chunk
            final int docBase = vectorsStream.readVInt();
            final int chunkDocs = vectorsStream.readVInt();
View Full Code Here

            mergeState.checkAbort.work(300);
            i = nextLiveDoc(i + 1, liveDocs, maxDoc);
          }
        }
       
        vectorsStream.seek(vectorsStream.length() - CodecUtil.footerLength());
        CodecUtil.checkFooter(vectorsStream);
      }
    }
    finish(mergeState.fieldInfos, docCount);
    return docCount;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.