diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java index 2d02e255fce..6b142c9480a 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java @@ -59,8 +59,7 @@ import org.slf4j.LoggerFactory; * To only retrieve columns with a specific timestamp, call {@link #setTimestamp(long) setTimestamp} * . *
- * To limit the number of versions of each column to be returned, call {@link #setMaxVersions(int) - * setMaxVersions}. + * To limit the number of versions of each column to be returned, call {@link #setMaxVersions(int)}. *
* To limit the maximum number of values returned for each call to next(), call
* {@link #setBatch(int) setBatch}.
@@ -341,7 +340,7 @@ public class Scan extends Query {
* returned, up the number of versions beyond the default.
* @param minStamp minimum timestamp value, inclusive
* @param maxStamp maximum timestamp value, exclusive
- * @see #setMaxVersions()
+ * @see #readAllVersions()
* @see #setMaxVersions(int)
* @return this
*/
@@ -356,7 +355,7 @@ public class Scan extends Query {
* and you want all versions returned, up the number of versions beyond the
* defaut.
* @param timestamp version timestamp
- * @see #setMaxVersions()
+ * @see #readAllVersions()
* @see #setMaxVersions(int)
* @return this
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.
@@ -374,7 +373,7 @@ public class Scan extends Query {
* and you want all versions returned, up the number of versions beyond the
* defaut.
* @param timestamp version timestamp
- * @see #setMaxVersions()
+ * @see #readAllVersions()
* @see #setMaxVersions(int)
* @return this
*/
@@ -517,19 +516,6 @@ public class Scan extends Query {
return this;
}
- /**
- * Get all available versions.
- * @return this
- * @deprecated since 2.0.0 and will be removed in 3.0.0. It is easy to misunderstand with column
- * family's max versions, so use {@link #readAllVersions()} instead.
- * @see #readAllVersions()
- * @see HBASE-17125
- */
- @Deprecated
- public Scan setMaxVersions() {
- return readAllVersions();
- }
-
/**
* Get up to the specified number of versions of each column.
* @param maxVersions maximum versions for each column
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
index 089b8eb3544..12060a742a2 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
@@ -374,7 +374,7 @@ public class TestImportExport {
assertTrue(runImport(args));
Scan s = new Scan();
- s.setMaxVersions();
+ s.readAllVersions();
s.setRaw(true);
ResultScanner scanner = t.getScanner(s);
Result r = scanner.next();
@@ -448,7 +448,7 @@ public class TestImportExport {
assertTrue(runImport(args));
Scan s = new Scan();
- s.setMaxVersions();
+ s.readAllVersions();
s.setRaw(true);
ResultScanner importedTScanner = importT.getScanner(s);
diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java
index 2a32f0c3682..ecef1d73cb7 100644
--- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java
+++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTimeRangeMapRed.java
@@ -182,7 +182,7 @@ public class TestTimeRangeMapRed {
Scan scan = new Scan();
scan.addColumn(FAMILY_NAME, COLUMN_NAME);
scan.setTimeRange(MINSTAMP, MAXSTAMP);
- scan.setMaxVersions();
+ scan.readAllVersions();
TableMapReduceUtil.initTableMapperJob(TABLE_NAME,
scan, ProcessTimeRangeMapper.class, Text.class, Text.class, job);
job.waitForCompletion(true);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
index 53670c4652a..cb1a192c233 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
@@ -148,7 +148,7 @@ public class TestPartialResultsFromClientSide {
public void testExpectedValuesOfPartialResults(boolean reversed) throws Exception {
Scan partialScan = new Scan();
- partialScan.setMaxVersions();
+ partialScan.readAllVersions();
// Max result size of 1 ensures that each RPC request will return a single cell. The scanner
// will need to reconstruct the results into a complete result before returning to the caller
partialScan.setMaxResultSize(1);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
index 0fcfbfb2793..70e21aeeb54 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
@@ -192,7 +192,7 @@ public class TestFromClientSide extends FromClientSideBase {
Scan s = new Scan(T1);
s.setTimeRange(0, ts + 3);
- s.setMaxVersions();
+ s.readAllVersions();
ResultScanner scanner = h.getScanner(s);
Cell[] kvs = scanner.next().rawCells();
assertArrayEquals(T2, CellUtil.cloneValue(kvs[0]));
@@ -201,7 +201,7 @@ public class TestFromClientSide extends FromClientSideBase {
s = new Scan(T1);
s.setRaw(true);
- s.setMaxVersions();
+ s.readAllVersions();
scanner = h.getScanner(s);
kvs = scanner.next().rawCells();
assertTrue(PrivateCellUtil.isDeleteFamily(kvs[0]));
@@ -1192,7 +1192,7 @@ public class TestFromClientSide extends FromClientSideBase {
scan = new Scan(ROW);
scan.addColumn(FAMILY, QUALIFIER);
- scan.setMaxVersions();
+ scan.readAllVersions();
result = getSingleScanResult(ht, scan);
assertNResult(result, ROW, FAMILY, QUALIFIER,
new long[] { STAMPS[1], STAMPS[2], STAMPS[3], STAMPS[4], STAMPS[5], STAMPS[6], STAMPS[7],
@@ -1210,7 +1210,7 @@ public class TestFromClientSide extends FromClientSideBase {
VALUES[8] }, 0, 7);
scan = new Scan(ROW);
- scan.setMaxVersions();
+ scan.readAllVersions();
result = getSingleScanResult(ht, scan);
assertNResult(result, ROW, FAMILY, QUALIFIER,
new long[] { STAMPS[1], STAMPS[2], STAMPS[3], STAMPS[4], STAMPS[5], STAMPS[6], STAMPS[7],
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide5.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide5.java
index 07c848f77ac..4205a560dc9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide5.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide5.java
@@ -1448,7 +1448,7 @@ public class TestFromClientSide5 extends FromClientSideBase {
int versions = 4;
Scan s = new Scan(row);
// get all the possible versions
- s.setMaxVersions();
+ s.readAllVersions();
s.setRaw(true);
try (ResultScanner scanner = table.getScanner(s)) {
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java
index 5f53d7e7712..0dbf745cfb0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java
@@ -199,7 +199,7 @@ public class TestScannersFromClientSide {
// without batch
scan = new Scan().withStartRow(ROW);
- scan.setMaxVersions();
+ scan.readAllVersions();
scanner = ht.getScanner(scan);
// c4:4, c5:5, c6:6, c7:7
@@ -213,7 +213,7 @@ public class TestScannersFromClientSide {
// with batch
scan = new Scan().withStartRow(ROW);
- scan.setMaxVersions();
+ scan.readAllVersions();
scan.setBatch(2);
scanner = ht.getScanner(scan);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java
index ff8e8c34b2a..6719337428f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java
@@ -356,7 +356,7 @@ public class TestTimestampsFilter {
Filter filter = new TimestampsFilter(versions);
Scan scan = new Scan(startRow, endRow);
scan.setFilter(filter);
- scan.setMaxVersions();
+ scan.readAllVersions();
ResultScanner scanner = ht.getScanner(scan);
return scanner.next(endRowIdx - startRowIdx + 1);
}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
index 7b47b570f4c..227eaa3334d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
@@ -114,7 +114,7 @@ public class TestColumnPrefixFilter {
ColumnPrefixFilter filter;
Scan scan = new Scan();
- scan.setMaxVersions();
+ scan.readAllVersions();
for (String s: prefixMap.keySet()) {
filter = new ColumnPrefixFilter(Bytes.toBytes(s));
@@ -183,7 +183,7 @@ public class TestColumnPrefixFilter {
ColumnPrefixFilter filter;
Scan scan = new Scan();
- scan.setMaxVersions();
+ scan.readAllVersions();
for (String s: prefixMap.keySet()) {
filter = new ColumnPrefixFilter(Bytes.toBytes(s));
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnRangeFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnRangeFilter.java
index c69466e0f63..1041969089a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnRangeFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnRangeFilter.java
@@ -226,7 +226,7 @@ public class TestColumnRangeFilter {
ColumnRangeFilter filter;
Scan scan = new Scan();
- scan.setMaxVersions();
+ scan.readAllVersions();
for (StringRange s : rangeMap.keySet()) {
filter = new ColumnRangeFilter(s.getStart() == null ? null : Bytes.toBytes(s.getStart()),
s.isStartInclusive(), s.getEnd() == null ? null : Bytes.toBytes(s.getEnd()),
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterListOrOperatorWithBlkCnt.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterListOrOperatorWithBlkCnt.java
index f252e773888..24ac7945e45 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterListOrOperatorWithBlkCnt.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterListOrOperatorWithBlkCnt.java
@@ -104,7 +104,7 @@ public class TestFilterListOrOperatorWithBlkCnt {
generateRows(numRows, ht, family, qf, value);
Scan scan = new Scan();
- scan.setMaxVersions();
+ scan.readAllVersions();
long blocksStart = getBlkAccessCount();
List