This is an automated email from the ASF dual-hosted git repository.
vjasani pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new 5349597fcde HBASE-29097 Add error logging when put creation fails
(#6694) (#6638)
5349597fcde is described below
commit 5349597fcde2d972b86d2e307abdd7bdea8f1527
Author: Aman Poonia <[email protected]>
AuthorDate: Sun Feb 16 09:35:40 2025 +0530
HBASE-29097 Add error logging when put creation fails (#6694) (#6638)
Signed-off-by: Viraj Jasani <[email protected]>
Signed-off-by: ukumawat <[email protected]>
---
.../main/java/org/apache/hadoop/hbase/MetaTableAccessor.java | 11 ++++++++++-
1 file changed, 10 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 f29104df3c0..efd5a83b9eb 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
@@ -1309,7 +1309,16 @@ public class MetaTableAccessor {
* @throws IllegalArgumentException when the provided RegionInfo is not the
default replica.
*/
public static Put makePutFromRegionInfo(RegionInfo regionInfo, long ts)
throws IOException {
- return addRegionInfo(new Put(getMetaKeyForRegion(regionInfo), ts),
regionInfo);
+ byte[] metaKeyForRegion = getMetaKeyForRegion(regionInfo);
+ try {
+ Put put = new Put(metaKeyForRegion, ts);
+ return addRegionInfo(put, regionInfo);
+ } catch (IllegalArgumentException ex) {
+ LOG.error(
+ "Got exception while creating put for regioninfo {}." + "meta key for
regioninfo is {}",
+ regionInfo.getRegionNameAsString(), metaKeyForRegion);
+ throw ex;
+ }
}
/**