This is an automated email from the ASF dual-hosted git repository.
ndimiduk 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 1986a6ec313 HBASE-24163 MOB compactor implementations should use
format specifiers when calling String.format
1986a6ec313 is described below
commit 1986a6ec3131ab8654380e2598cde75488b9ad83
Author: Sean Busbey <[email protected]>
AuthorDate: Fri Apr 10 11:00:53 2020 -0500
HBASE-24163 MOB compactor implementations should use format specifiers when
calling String.format
Signed-off-by: stack <[email protected]>
Signed-off-by: Viraj Jasani <[email protected]>
Signed-off-by: Josh Elser <[email protected]>
---
.../org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java | 10 +++++-----
.../org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java | 8 ++++----
2 files changed, 9 insertions(+), 9 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 6de12111a82..e93d87237cc 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
@@ -439,9 +439,9 @@ public class DefaultMobStoreCompactor extends
DefaultCompactor {
mobRefSet.get().put(refTable.get(), fName);
writer.append(c);
} else {
- throw new IOException("MOB cell did not contain a
tablename "
+ throw new IOException(String.format("MOB cell did not
contain a tablename "
+ "tag. should not be possible. see ref guide on mob
troubleshooting. "
- + "store=" + getStoreInfo() + " cell=" + c);
+ + "store=%s cell=%s", getStoreInfo(), c));
}
}
}
@@ -495,9 +495,9 @@ public class DefaultMobStoreCompactor extends
DefaultCompactor {
mobRefSet.get().put(refTable.get(),
MobUtils.getMobFileName(c));
writer.append(c);
} else {
- throw new IOException("MOB cell did not contain a tablename "
- + "tag. should not be possible. see ref guide on mob
troubleshooting. " + "store="
- + getStoreInfo() + " cell=" + c);
+ throw new IOException(String.format("MOB cell did not contain
a tablename "
+ + "tag. should not be possible. see ref guide on mob
troubleshooting. "
+ + "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 f19289dca75..324b897d9fd 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,9 +246,9 @@ public class FaultyMobStoreCompactor extends
DefaultMobStoreCompactor {
mobRefSet.get().put(refTable.get(),
MobUtils.getMobFileName(c));
writer.append(c);
} else {
- throw new IOException("MOB cell did not contain a tablename "
+ throw new IOException(String.format("MOB cell did not
contain a tablename "
+ "tag. should not be possible. see ref guide on mob
troubleshooting. "
- + "store=" + getStoreInfo() + " cell=" + 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,9 +270,9 @@ public class FaultyMobStoreCompactor extends
DefaultMobStoreCompactor {
mobRefSet.get().put(refTable.get(),
MobUtils.getMobFileName(c));
writer.append(c);
} else {
- throw new IOException("MOB cell did not contain a
tablename "
+ throw new IOException(String.format("MOB cell did not
contain a tablename "
+ "tag. should not be possible. see ref guide on mob
troubleshooting. "
- + "store=" + getStoreInfo() + " cell=" + c);
+ + "store=%s cell=%s", getStoreInfo(), c));
}
}
}