HBASE-23328 info:regioninfo goes wrong when region replicas enabled (#863)

Signed-off-by: Ramkrishna <ramkrishna.s.vasudevan@intel.com>
Signed-off-by: Guangxu Cheng <guangxucheng@gmail.com>
This commit is contained in:
Michael Stack 2019-11-21 22:57:22 -08:00 committed by stack
parent ca6059f4db
commit 54ad797abb
1 changed files with 4 additions and 1 deletions

View File

@ -1839,7 +1839,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;
}