We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TODO if big loop over big file pointer, may not be efficient, consider jump to the nearest file block. https://github.com/Opentracker/luceneOnCassandra/blob/master/src/main/java/org/apache/lucene/cassandra/FileDescriptorUtils.java
long jumpBlocksSize = 0; long newWhichBlock = filePointer / descriptor.getBlockSize(); if ( newWhichBlock > 0) { System.out.println("using new seek"); int start = (int) --newWhichBlock; jumpBlocksSize = descriptor.getBlockSize() * start; System.out.println("start " + start + " jumpBlocksSize " + jumpBlocksSize); for (int i = start; i <= descriptor.getBlocks().size(); i++) { System.out.println("loop " + i); FileBlock fb = descriptor.getBlocks().get(i); jumpBlocksSize += fb.getDataLength(); if (filePointer < jumpBlocksSize) { fb.setBlockOffset(jumpBlocksSize - fb.getDataLength()); fb.setDataPosition((int) (filePointer - fb.getBlockOffset())); System.out.println("hit and return block " + fb.getBlockNumber()); return fb; } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
TODO if big loop over big file pointer, may not be efficient, consider jump to the nearest file block. https://github.com/Opentracker/luceneOnCassandra/blob/master/src/main/java/org/apache/lucene/cassandra/FileDescriptorUtils.java
The text was updated successfully, but these errors were encountered: