iamminji commented on a change in pull request #2592:
URL: https://github.com/apache/hbase/pull/2592#discussion_r513170799



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/CreateSnapshot.java
##########
@@ -67,24 +67,14 @@ protected void processOptions(CommandLine cmd) {
 
     @Override
     protected int doWork() throws Exception {
-        Connection connection = null;
-        Admin admin = null;
-        try {
-            connection = ConnectionFactory.createConnection(getConf());
-            admin = connection.getAdmin();
+        try (Connection connection = 
ConnectionFactory.createConnection(getConf())) {

Review comment:
       Thank you :) I modified the code based on your suggestion.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to