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.
Asked
Active
Viewed 3,927 times
8
1 Answers
2
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.

Tariq
- 34,076
- 8
- 57
- 79
-
6This 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? – smci Nov 10 '17 at 00:02
-
@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? – Julia Chang Jan 11 '21 at 16:36
-
@smci Thanks. Somebody told me using ctrl+d can stop an incomplete command. It works. – Julia Chang Jan 12 '21 at 03:05
-
1@JuliaChang: that's good to know, presumably with current version, because when I used hbase several years ago it didn't. – smci Jan 12 '21 at 18:21