Reputation: 627
I am trying to run 'scan' command on HABSE shell.
scan 'table_name'
I am getting result as this:
ROW COLUMN+CELL
000001bff3df$94a8a4c0$608812cf column=general:bcc, timestamp=1521624689099, value=
@bt2ta
000001bff3df$94a8a4c0$608812cf column=general:cc, timestamp=1521624689099, value=
@bt2ta
000001bff3df$94a8a4c0$608812cf column=general:from, timestamp=1521624689099, value="Ken Turner" <[email protected]>
@bt2ta
If you look at the result, it is not well formatted. I could not figure out what is ROW and what is COLUMN+CELL.
Que. Is there any way I can format this result for better readability?
Upvotes: 2
Views: 1316
Reputation: 1
This behavior seems to depend on terminal settings. I see column wrapping when I have TERM=dumb in my environment variables. I don't see it when I have TERM=xterm or TERM=ansi
Upvotes: 0
Reputation: 5547
The hbase shell
is not displaying the result properly due to terminal window limitation. Tr o output the scan result to a file.
hbase shell
)Execute the below command
echo "scan 'table_name'" | hbase shell > myText
The output in mytext
would not be wrapped on key
. Once you have data in the file, you can use shell commands to format is further as per your requirement.
Upvotes: 2