HBASE-13199 ADDENDUM Some small improvements on canary tool (Shaohui Liu)

This commit is contained in:
Liu Shaohui 2015-03-20 15:22:14 -05:00 committed by Sean Busbey
parent 6d4460341e
commit f4eb7191be
1 changed files with 6 additions and 9 deletions

View File

@ -153,14 +153,13 @@ public final class Canary implements Tool {
} catch (IOException e) {
LOG.debug("sniffRegion failed", e);
sink.publishReadFailure(region, e);
return null;
} finally {
if (table != null) {
try {
table.close();
} catch (IOException e) {
} catch (IOException ioe) {
}
}
return null;
}
byte[] startKey = null;
@ -204,17 +203,15 @@ public final class Canary implements Tool {
if (rs != null) {
rs.close();
}
if (table != null) {
try {
table.close();
} catch (IOException e) {
}
}
scan = null;
get = null;
startKey = null;
}
}
try {
table.close();
} catch (IOException e) {
}
return null;
}
}