Skip to content

Commit 3a81784

Browse files
stotymeszibalu
authored andcommitted
HBASE-28345 Close HBase connection on exit from HBase Shell (#5665)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Balazs Meszaros <meszibalu@apache.org>
1 parent 7f531f3 commit 3a81784

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hbase-shell/src/main/ruby/shell.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ class Shell
108108
# exit the interactive shell and save that this
109109
# happend via a call to exit
110110
def exit(ret = 0)
111+
# Non-deamon Netty threadpool in ZK ClientCnxnSocketNetty cannot be shut down otherwise
112+
begin
113+
hbase.shutdown
114+
rescue Exception
115+
end
111116
@exit_code = ret
112117
IRB.irb_exit(IRB.CurrentContext.irb, ret)
113118
end

0 commit comments

Comments
 (0)