/** * Check if the specified timestamp is within this TimeRange. * <p> * Returns true if within interval [minStamp, maxStamp), false if not. * @param bytes timestamp to check * @param offset offset into the bytes * @return true if within TimeRange, false if not * @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above and may be * changed to private or removed in 3.0. Use {@link #withinTimeRange(long)} instead */ @Deprecated public boolean withinTimeRange(byte [] bytes, int offset) { if (allTime) { return true; } return withinTimeRange(Bytes.toLong(bytes, offset)); }
@Override public MatchCode match(Cell cell) throws IOException { if (filter != null && filter.filterAllRemaining()) { return MatchCode.DONE_SCAN; } MatchCode returnCode = preCheck(cell); if (returnCode != null) { return returnCode; } long timestamp = cell.getTimestamp(); byte typeByte = cell.getTypeByte(); if (PrivateCellUtil.isDelete(typeByte)) { boolean includeDeleteMarker = seePastDeleteMarkers ? tr.withinTimeRange(timestamp) : tr.withinOrAfterTimeRange(timestamp); if (includeDeleteMarker) { this.deletes.add(cell); } return MatchCode.SKIP; } returnCode = checkDeleted(deletes, cell); if (returnCode != null) { return returnCode; } return matchColumn(cell, timestamp, typeByte); }
/** * Check if the specified timestamp is within this TimeRange. * <p> * Returns true if within interval [minStamp, maxStamp), false * if not. * @param bytes timestamp to check * @param offset offset into the bytes * @return true if within TimeRange, false if not */ public boolean withinTimeRange(byte [] bytes, int offset) { if(allTime) return true; return withinTimeRange(Bytes.toLong(bytes, offset)); }
/** * Check if the specified timestamp is within this TimeRange. * <p> * Returns true if within interval [minStamp, maxStamp), false * if not. * @param bytes timestamp to check * @param offset offset into the bytes * @return true if within TimeRange, false if not */ public boolean withinTimeRange(byte [] bytes, int offset) { if(allTime) return true; return withinTimeRange(Bytes.toLong(bytes, offset)); }
/** * Check if the specified timestamp is within this TimeRange. * <p> * Returns true if within interval [minStamp, maxStamp), false if not. * @param bytes timestamp to check * @param offset offset into the bytes * @return true if within TimeRange, false if not * @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above and may be * changed to private or removed in 3.0. Use {@link #withinTimeRange(long)} instead */ @Deprecated public boolean withinTimeRange(byte [] bytes, int offset) { if (allTime) { return true; } return withinTimeRange(Bytes.toLong(bytes, offset)); }
/** * Check if the specified timestamp is within this TimeRange. * <p> * Returns true if within interval [minStamp, maxStamp), false if not. * @param bytes timestamp to check * @param offset offset into the bytes * @return true if within TimeRange, false if not * @deprecated This is made @InterfaceAudience.Private in the 2.0 line and above and may be * changed to private or removed in 3.0. Use {@link #withinTimeRange(long)} instead */ @Deprecated public boolean withinTimeRange(byte [] bytes, int offset) { if (allTime) { return true; } return withinTimeRange(Bytes.toLong(bytes, offset)); }
protected void checkConstructedDataGet(List<KeyValue> putKvs, Filter filter, Get get) { Assert.assertEquals(putKvs.size(), get.getFamilyMap().size()); for (KeyValue kv : putKvs) { if (ColumnUtil.isCommitToSameFamily()) { Assert.assertTrue(get.getFamilyMap().containsKey(kv.getFamily())); } get.getTimeRange().withinTimeRange(kv.getTimestamp()); } if (filter == null) { Assert.assertTrue(get.getFilter() instanceof ColumnTimestampFilter); } else { Assert.assertTrue(get.getFilter() instanceof FilterList); FilterList filterList = (FilterList)get.getFilter(); Assert.assertEquals(2, filterList.getFilters().size()); Assert.assertTrue(filterList.getFilters().get(0) instanceof ColumnTimestampFilter); Assert.assertEquals(filter, filterList.getFilters().get(1)); } }
tr.withinTimeRange(timestamp) : tr.withinOrAfterTimeRange(timestamp); if (includeDeleteMarker
tr.withinTimeRange(timestamp) : tr.withinOrAfterTimeRange(timestamp); if (includeDeleteMarker