Sets the time range to scan. KeyValues that have a timestamp that do not fall in the range [min_timestamp; max_timestamp[ will not be returned by the scanner. HBase has internal optimizations to avoid loading in memory data filtered out in some cases. @param min_timestamp The mi
(final long min_timestamp, final long max_timestamp)
| 687 | * @since 1.3 |
| 688 | */ |
| 689 | public void setTimeRange(final long min_timestamp, final long max_timestamp) { |
| 690 | if (min_timestamp > max_timestamp) { |
| 691 | throw new IllegalArgumentException("New minimum timestamp (" + min_timestamp |
| 692 | + ") is greater than the new maximum" |
| 693 | + " timestamp: " + max_timestamp); |
| 694 | } else if (min_timestamp < 0) { |
| 695 | throw new IllegalArgumentException("Negative minimum timestamp: " |
| 696 | + min_timestamp); |
| 697 | } |
| 698 | checkScanningNotStarted(); |
| 699 | // We now have the guarantee that max_timestamp >= 0, no need to check it. |
| 700 | this.min_timestamp = min_timestamp; |
| 701 | this.max_timestamp = max_timestamp; |
| 702 | } |
| 703 | |
| 704 | /** |
| 705 | * Scans a number of rows. Calling this method is equivalent to: |
no test coverage detected