From 09d20fb4d7a5e7f791eafe63bd662a70759d08c7 Mon Sep 17 00:00:00 2001 From: Sean Busbey Date: Fri, 10 Apr 2020 11:00:53 -0500 Subject: [PATCH] HBASE-24163 MOB compactor implementations should use format specifiers when calling String.format (#1479) Signed-off-by: stack Signed-off-by: Viraj Jasani Signed-off-by: Josh Elser --- .../java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java | 4 ++-- .../java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java index 45b9d80573..231ab09dc3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java @@ -435,7 +435,7 @@ public class DefaultMobStoreCompactor extends DefaultCompactor { } else { throw new IOException(String.format("MOB cell did not contain a tablename " + "tag. should not be possible. see ref guide on mob troubleshooting. " + - "store={} cell={}", getStoreInfo(), c)); + "store=%s cell=%s", getStoreInfo(), c)); } } } @@ -491,7 +491,7 @@ public class DefaultMobStoreCompactor extends DefaultCompactor { } else { throw new IOException(String.format("MOB cell did not contain a tablename " + "tag. should not be possible. see ref guide on mob troubleshooting. " + - "store={} cell={}", getStoreInfo(), c)); + "store=%s cell=%s", getStoreInfo(), c)); } } else { String errMsg = String.format("Corrupted MOB reference: %s", c.toString()); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java index 0f8852f96f..b62a8e309d 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java @@ -246,7 +246,7 @@ public class FaultyMobStoreCompactor extends DefaultMobStoreCompactor { } else { throw new IOException(String.format("MOB cell did not contain a tablename " + "tag. should not be possible. see ref guide on mob troubleshooting. " + - "store={} cell={}", getStoreInfo(), c)); + "store=%s cell=%s", getStoreInfo(), c)); } } else { // If the value is not larger than the threshold, it's not regarded a mob. Retrieve @@ -270,7 +270,7 @@ public class FaultyMobStoreCompactor extends DefaultMobStoreCompactor { } else { throw new IOException(String.format("MOB cell did not contain a tablename " + "tag. should not be possible. see ref guide on mob troubleshooting. " + - "store={} cell={}", getStoreInfo(), c)); + "store=%s cell=%s", getStoreInfo(), c)); } } } -- 2.11.4.GIT