/** * Move the cursor to the next key-value pair. The entry returned by the * previous entry() call will be invalid. * * @return true if the cursor successfully moves. False when cursor is * already at the end location and cannot be advanced. * @throws IOException */ public boolean advance() throws IOException { if (atEnd()) { return false; } int curBid = currentLocation.getBlockIndex(); long curRid = currentLocation.getRecordIndex(); long entriesInBlock = reader.getBlockEntryCount(curBid); if (curRid + 1 >= entriesInBlock) { if (endLocation.compareTo(curBid + 1, 0) <= 0) { // last entry in TFile. parkCursorAtEnd(); } else { // last entry in Block. initBlock(curBid + 1); } } else { inBlockAdvance(1); } return true; }
/** * Move the cursor to the next key-value pair. The entry returned by the * previous entry() call will be invalid. * * @return true if the cursor successfully moves. False when cursor is * already at the end location and cannot be advanced. * @throws IOException */ public boolean advance() throws IOException { if (atEnd()) { return false; } int curBid = currentLocation.getBlockIndex(); long curRid = currentLocation.getRecordIndex(); long entriesInBlock = reader.getBlockEntryCount(curBid); if (curRid + 1 >= entriesInBlock) { if (endLocation.compareTo(curBid + 1, 0) <= 0) { // last entry in TFile. parkCursorAtEnd(); } else { // last entry in Block. initBlock(curBid + 1); } } else { inBlockAdvance(1); } return true; }
/** * Move the cursor to the next key-value pair. The entry returned by the * previous entry() call will be invalid. * * @return true if the cursor successfully moves. False when cursor is * already at the end location and cannot be advanced. * @throws IOException */ public boolean advance() throws IOException { if (atEnd()) { return false; } int curBid = currentLocation.getBlockIndex(); long curRid = currentLocation.getRecordIndex(); long entriesInBlock = reader.getBlockEntryCount(curBid); if (curRid + 1 >= entriesInBlock) { if (endLocation.compareTo(curBid + 1, 0) <= 0) { // last entry in TFile. parkCursorAtEnd(); } else { // last entry in Block. initBlock(curBid + 1); } } else { inBlockAdvance(1); } return true; }
/** * Move the cursor to the next key-value pair. The entry returned by the * previous entry() call will be invalid. * * @return true if the cursor successfully moves. False when cursor is * already at the end location and cannot be advanced. * @throws IOException */ public boolean advance() throws IOException { if (atEnd()) { return false; } int curBid = currentLocation.getBlockIndex(); long curRid = currentLocation.getRecordIndex(); long entriesInBlock = reader.getBlockEntryCount(curBid); if (curRid + 1 >= entriesInBlock) { if (endLocation.compareTo(curBid + 1, 0) <= 0) { // last entry in TFile. parkCursorAtEnd(); } else { // last entry in Block. initBlock(curBid + 1); } } else { inBlockAdvance(1); } return true; }
/** * Move the cursor to the next key-value pair. The entry returned by the * previous entry() call will be invalid. * * @return true if the cursor successfully moves. False when cursor is * already at the end location and cannot be advanced. * @throws IOException */ public boolean advance() throws IOException { if (atEnd()) { return false; } int curBid = currentLocation.getBlockIndex(); long curRid = currentLocation.getRecordIndex(); long entriesInBlock = reader.getBlockEntryCount(curBid); if (curRid + 1 >= entriesInBlock) { if (endLocation.compareTo(curBid + 1, 0) <= 0) { // last entry in TFile. parkCursorAtEnd(); } else { // last entry in Block. initBlock(curBid + 1); } } else { inBlockAdvance(1); } return true; }
/** * Seek to the end of the scanner. The entry returned by the previous * entry() call will be invalid. * * @throws IOException */ public void seekToEnd() throws IOException { parkCursorAtEnd(); }
/** * Seek to the end of the scanner. The entry returned by the previous * entry() call will be invalid. * * @throws IOException */ public void seekToEnd() throws IOException { parkCursorAtEnd(); }
/** * Close the scanner. Release all resources. The behavior of using the * scanner after calling close is not defined. The entry returned by the * previous entry() call will be invalid. */ @Override public void close() throws IOException { parkCursorAtEnd(); }
/** * Close the scanner. Release all resources. The behavior of using the * scanner after calling close is not defined. The entry returned by the * previous entry() call will be invalid. */ public void close() throws IOException { parkCursorAtEnd(); }
/** * Close the scanner. Release all resources. The behavior of using the * scanner after calling close is not defined. The entry returned by the * previous entry() call will be invalid. */ @Override public void close() throws IOException { parkCursorAtEnd(); }
/** * Seek to the end of the scanner. The entry returned by the previous * entry() call will be invalid. * * @throws IOException */ public void seekToEnd() throws IOException { parkCursorAtEnd(); }
/** * Close the scanner. Release all resources. The behavior of using the * scanner after calling close is not defined. The entry returned by the * previous entry() call will be invalid. */ @Override public void close() throws IOException { parkCursorAtEnd(); }
/** * Seek to the end of the scanner. The entry returned by the previous * entry() call will be invalid. * * @throws IOException */ public void seekToEnd() throws IOException { parkCursorAtEnd(); }
/** * Seek to the end of the scanner. The entry returned by the previous * entry() call will be invalid. * * @throws IOException */ public void seekToEnd() throws IOException { parkCursorAtEnd(); }
/** * Close the scanner. Release all resources. The behavior of using the * scanner after calling close is not defined. The entry returned by the * previous entry() call will be invalid. */ @Override public void close() throws IOException { parkCursorAtEnd(); }
/** * Move the cursor to the next key-value pair. The entry returned by the * previous entry() call will be invalid. * * @return true if the cursor successfully moves. False when cursor is * already at the end location and cannot be advanced. * @throws IOException */ public boolean advance() throws IOException { if (atEnd()) { return false; } int curBid = currentLocation.getBlockIndex(); long curRid = currentLocation.getRecordIndex(); long entriesInBlock = reader.getBlockEntryCount(curBid); if (curRid + 1 >= entriesInBlock) { if (endLocation.compareTo(curBid + 1, 0) <= 0) { // last entry in TFile. parkCursorAtEnd(); } else { // last entry in Block. initBlock(curBid + 1); } } else { inBlockAdvance(1); } return true; }
/** * Close the scanner. Release all resources. The behavior of using the * scanner after calling close is not defined. The entry returned by the * previous entry() call will be invalid. */ @Override public void close() throws IOException { parkCursorAtEnd(); }
/** * Seek to the end of the scanner. The entry returned by the previous * entry() call will be invalid. * * @throws IOException */ public void seekToEnd() throws IOException { parkCursorAtEnd(); }