Skip to content

Commit 870b815

Browse files
committed
Add comment
1 parent 237d954 commit 870b815

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,10 @@ private RegionLocations locateRegionInMeta(TableName tableName, byte[] row,
12861286
Scan s = new Scan();
12871287
s.setReversed(true);
12881288
s.withStartRow(metaKey);
1289+
1290+
// Adding a filter on CATALOG_FAMILY is necessary for compatibility
1291+
// with hbase 2.x and beyond, which adds additional column families.
1292+
// See HBASE-26797
12891293
s.addFamily(HConstants.CATALOG_FAMILY);
12901294

12911295
if (this.useMetaReplicas) {

hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ private static Result getClosestRowOrBefore(final Table metaTable, final TableNa
220220
throws IOException {
221221
byte[] searchRow = HRegionInfo.createRegionName(userTableName, row, HConstants.NINES, false);
222222
Scan scan = Scan.createGetClosestRowOrBeforeReverseScan(searchRow);
223+
// Adding a filter on CATALOG_FAMILY is necessary for compatibility
224+
// with hbase 2.x and beyond, which adds additional column families.
225+
// See HBASE-26797
223226
scan.addFamily(HConstants.CATALOG_FAMILY);
224227
if (useMetaReplicas) {
225228
scan.setConsistency(Consistency.TIMELINE);

0 commit comments

Comments
 (0)