HBASE-24163 MOB compactor implementations should use format specifiers 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>
This commit is contained in:
Sean Busbey 2020-04-10 11:00:53 -05:00 committed by Nick Dimiduk
parent e4c141cb48
commit 1986a6ec31
2 changed files with 9 additions and 9 deletions

View File

@ -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());

View File

@ -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));
}
}
}