[
https://issues.apache.org/jira/browse/HBASE-18970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
AMIT VIRMANI updated HBASE-18970:
---------------------------------
Attachment: test_shell-Output.txt
test_shell.sh
samplecmd.txt
HBase-18970.branch-2.001.patch
I tried [~mdrob]'s suggestion of calling the command from init - it seems to
work.
Here are the things that I tried -
case 1: press enter
{code}
hbase(main):001:0> disable_all 'test*'
test
testt
Disable the above 2 tables (y/n)?
y
2 tables successfully disabled
Took 3.5838 seconds
{code}
case 2: press ctrl-j
{code}
hbase(main):002:0> enable_all 'test*'
test
testt
Enable the above 2 tables (y/n)?
y
2 tables successfully enabled
Took 5.8780 seconds
{code}
case 3: I also tried with noninteractive mode -
{code}
dhcp-10-16-2-161:hbase amitvirmani$ echo "describe 'test'" | ./bin/hbase shell
-n
Table test is ENABLED
test
COLUMN FAMILIES DESCRIPTION
{NAME => 'cf', VERSIONS => '1', EVICT_BLOCKS_ON_CLOSE => 'false', NEW_VERSION_BE
HAVIOR => 'false', KEEP_DELETED_CELLS => 'FALSE', CACHE_DATA_ON_WRITE => 'false'
, DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', MIN_VERSIONS => '0', REPLICAT
ION_SCOPE => '0', BLOOMFILTER => 'ROW', CACHE_INDEX_ON_WRITE => 'false', IN_MEMO
RY => 'false', CACHE_BLOOMS_ON_WRITE => 'false', PREFETCH_BLOCKS_ON_OPEN => 'fal
se', COMPRESSION => 'NONE', BLOCKCACHE => 'true', BLOCKSIZE => '65536'}
1 row(s)
Took 0.5099 seconds
{code}
case 4: run with text file as an input - samplecmd.txt attached, output below
{code}
dhcp-10-16-2-161:hbase amitvirmani$ ./bin/hbase shell
/Users/amitvirmani/Downloads/samplecmd.txt
2017-12-19 10:43:48,865 WARN [main] util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes where
applicable
Created table newtest
Took 1.3773 seconds
TABLE
newtest
1 row(s)
Took 0.0250 seconds
Took 0.1705 seconds
Took 0.0033 seconds
Took 0.0027 seconds
Took 0.0027 seconds
ROW COLUMN+CELL
row1 column=cf:a, timestamp=1513709031217, value=value1
row2 column=cf:b, timestamp=1513709031242, value=value2
row3 column=cf:c, timestamp=1513709031246, value=value3
row4 column=cf:d, timestamp=1513709031250, value=value4
4 row(s)
Took 0.0278 seconds
COLUMN CELL
cf:a timestamp=1513709031217, value=value1
1 row(s)
Took 0.0302 seconds
Took 0.4487 seconds
Took 0.7322 seconds
{code}
case 5: ran the attached test_shell.sh to run interactive and non-interactive
list to output proper status codes - output also attached
Also ran the shell tests locally and they passed - mvn clean test
-Dtest=TestShell* -pl hbase-shell -am
Please let us know if anything else needs to be run.
> The version of jruby we use now can't get interactive input from prompt
> -----------------------------------------------------------------------
>
> Key: HBASE-18970
> URL: https://issues.apache.org/jira/browse/HBASE-18970
> Project: HBase
> Issue Type: Task
> Components: shell
> Reporter: Chia-Ping Tsai
> Assignee: Mike Drob
> Priority: Critical
> Fix For: 2.0.0-beta-1
>
> Attachments: HBase-18970.branch-2.001.patch, samplecmd.txt,
> test_shell-Output.txt, test_shell.sh
>
>
> case 1: press enter
> {code}
> hbase(main):002:0> disable_all 'chia(.*)'
> chia_1
>
>
> Disable the above 1 tables (y/n)?
> y^M
> {code}
> case 2: press ctrl-j
> {code}
> hbase(main):001:0> disable_all 'chia(.*)'
> chia_1
>
>
> Disable the above 1 tables (y/n)?
> y^J1 tables successfully disabled
> Took 5.0059 seconds
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)