throws IOException {
HRegionInterface rs =
this.connection.getHRegionConnection(sn.getHostname(), sn.getPort());
if (family != null) {
try {
rs.compactRegion(hri, major, family);
} catch (IOException ioe) {
String notFoundMsg = "java.lang.NoSuchMethodException: org.apache.hadoop.hbase.ipc.HRegionInterface."
+ "compactRegion(org.apache.hadoop.hbase.HRegionInfo, boolean, [B)";
if (ioe.getMessage().contains(notFoundMsg)) {
throw new IOException("per-column family compaction not supported on this version "