Sometimes when I run a scan '<tablename>
. I see a continuous flood of data being printed because the table is big. I want to kill the process that print the data. Is there a way to do it other than Ctrl-C
? because Ctrl-C
kills the shell process and I don't want to exit the shell.
How to kill a scan operation in hbase shell without Ctrl-C
You could use scan with LIMIT to limit the scan output on shell :
scan 'table', LIMIT => 5
This will show you only 5 rows. You could also press ctlr+s to hold the scan, if you have done a full scan and want to hold on at a specific row.
This is not really an answer to the question as asked though. In the case where you issue a 'scan' command and accidentally forget it will return thousands/millions of rows, is there a solution to interrupt it or not? –
Haukom
@smci, Why does an asterisk sign show at the end of the hbase shell prompt Instead of > after typing a command ending as ';'? How do I fix the prompt ending with an asterisk sign without exit hbase shell? –
Gottlieb
@Haukom Thanks. Somebody told me using ctrl+d can stop an incomplete command. It works. –
Gottlieb
@JuliaChang: that's good to know, presumably with current version, because when I used hbase several years ago it didn't. –
Haukom
© 2022 - 2024 — McMap. All rights reserved.