Skip to content

Commit

Permalink
HBASE-24163 MOB compactor implementations should use format specifier…
Browse files Browse the repository at this point in the history
…s when calling String.format

Signed-off-by: stack <stack@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Josh Elser <elserj@apache.org>
  • Loading branch information
busbey authored and ndimiduk committed Aug 17, 2022
1 parent e4c141c commit 1986a6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Expand Up @@ -439,9 +439,9 @@ protected boolean performCompaction(FileDetails fd, InternalScanner scanner, Cel
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));
}
}
}
Expand Down Expand Up @@ -495,9 +495,9 @@ protected boolean performCompaction(FileDetails fd, InternalScanner scanner, Cel
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());
Expand Down
Expand Up @@ -246,9 +246,9 @@ protected boolean performCompaction(FileDetails fd, InternalScanner scanner, Cel
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
Expand All @@ -270,9 +270,9 @@ protected boolean performCompaction(FileDetails fd, InternalScanner scanner, Cel
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));
}
}
}
Expand Down

0 comments on commit 1986a6e

Please sign in to comment.