You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2019/11/22 06:57:31 UTC
[hbase] branch branch-2 updated: HBASE-23328 info:regioninfo goes
wrong when region replicas enabled (#863)
This is an automated email from the ASF dual-hosted git repository.
stack pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 12b2e1f HBASE-23328 info:regioninfo goes wrong when region replicas enabled (#863)
12b2e1f is described below
commit 12b2e1fd524921cbbfddb0f1716b985174746737
Author: Michael Stack <sa...@users.noreply.github.com>
AuthorDate: Thu Nov 21 22:57:22 2019 -0800
HBASE-23328 info:regioninfo goes wrong when region replicas enabled (#863)
Signed-off-by: Ramkrishna <ra...@intel.com>
Signed-off-by: Guangxu Cheng <gu...@gmail.com>
---
.../src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index 09a0f95..d9dc779 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -1898,7 +1898,10 @@ public class MetaTableAccessor {
.setQualifier(HConstants.REGIONINFO_QUALIFIER)
.setTimestamp(p.getTimestamp())
.setType(Type.Put)
- .setValue(RegionInfo.toByteArray(hri))
+ // Serialize the Default Replica HRI otherwise scan of hbase:meta
+ // shows an info:regioninfo value with encoded name and region
+ // name that differs from that of the hbase;meta row.
+ .setValue(RegionInfo.toByteArray(RegionReplicaUtil.getRegionInfoForDefaultReplica(hri)))
.build());
return p;
}