/** * Pick the next cell that the scanner should seek to. Since this can skip any number of cells * any of which can be a delete this can resurect old data. * * The method will only be used if canHint was set to true while creating the filter. * * @throws IOException This will never happen. */ @Override public Cell getNextCellHint(Cell currentCell) throws IOException { if (!canHint) { return null; } Long nextTimestampObject = timestamps.lower(currentCell.getTimestamp()); if (nextTimestampObject == null) { // This should only happen if the current column's // timestamp is below the last one in the list. // // It should never happen as the filterCell should return NEXT_COL // but it's always better to be extra safe and protect against future // behavioral changes. return PrivateCellUtil.createLastOnRowCol(currentCell); } // Since we know the nextTimestampObject isn't null here there must still be // timestamps that can be included. Cast the Long to a long and return the // a cell with the current row/cf/col and the next found timestamp. long nextTimestamp = nextTimestampObject; return PrivateCellUtil.createFirstOnRowColTS(currentCell, nextTimestamp); }
Cell firstCell = PrivateCellUtil.createFirstOnRowColTS(cell, HConstants.LATEST_TIMESTAMP); SortedSet<Cell> ss = this.tailSet(firstCell); Iterator<Cell> it = ss.iterator();
setCurrentCell(PrivateCellUtil.createFirstOnRowColTS(kv, maxTimestampInFile)); } else {
/** * Pick the next cell that the scanner should seek to. Since this can skip any number of cells * any of which can be a delete this can resurect old data. * * The method will only be used if canHint was set to true while creating the filter. * * @throws IOException This will never happen. */ @Override public Cell getNextCellHint(Cell currentCell) throws IOException { if (!canHint) { return null; } Long nextTimestampObject = timestamps.lower(currentCell.getTimestamp()); if (nextTimestampObject == null) { // This should only happen if the current column's // timestamp is below the last one in the list. // // It should never happen as the filterCell should return NEXT_COL // but it's always better to be extra safe and protect against future // behavioral changes. return PrivateCellUtil.createLastOnRowCol(currentCell); } // Since we know the nextTimestampObject isn't null here there must still be // timestamps that can be included. Cast the Long to a long and return the // a cell with the current row/cf/col and the next found timestamp. long nextTimestamp = nextTimestampObject; return PrivateCellUtil.createFirstOnRowColTS(currentCell, nextTimestamp); }
/** * Pick the next cell that the scanner should seek to. Since this can skip any number of cells * any of which can be a delete this can resurect old data. * * The method will only be used if canHint was set to true while creating the filter. * * @throws IOException This will never happen. */ @Override public Cell getNextCellHint(Cell currentCell) throws IOException { if (!canHint) { return null; } Long nextTimestampObject = timestamps.lower(currentCell.getTimestamp()); if (nextTimestampObject == null) { // This should only happen if the current column's // timestamp is below the last one in the list. // // It should never happen as the filterCell should return NEXT_COL // but it's always better to be extra safe and protect against future // behavioral changes. return PrivateCellUtil.createLastOnRowCol(currentCell); } // Since we know the nextTimestampObject isn't null here there must still be // timestamps that can be included. Cast the Long to a long and return the // a cell with the current row/cf/col and the next found timestamp. long nextTimestamp = nextTimestampObject; return PrivateCellUtil.createFirstOnRowColTS(currentCell, nextTimestamp); }