HBASE-13199 ADDENDUM Some small improvements on canary tool (Shaohui Liu)
This commit is contained in:
parent
6d4460341e
commit
f4eb7191be
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue