[
https://issues.apache.org/jira/browse/HBASE-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13531883#comment-13531883
]
Jonathan Hsieh commented on HBASE-7353:
---------------------------------------
here's what it looks like (also, the commands in the descrition work).
{code}
hbase(main):011:0> list
TABLE
TestTable
pe-1-table
pe-10-table
pe-11-table2
pe-11-table3
pe-12-table
pe-13-table
pe-14-table
pe-15-table
pe-16-table
pe-17-table
pe-18-table
pe-19-table
pe-20-table
pe-21-table
pe-22-table
pe-23-table
pe-24-table
pe-25-table
pe-26-table
pe-27-table
pe-28-table
pe-29-table
23 row(s) in 0.0800 seconds
=> ["TestTable", "pe-1-table", "pe-10-table", "pe-11-table2", "pe-11-table3",
"pe-12-table", "pe-13-table", "pe-14-table", "pe-15-table", "pe-16-table",
"pe-17-table", "pe-18-table", "pe-19-table", "pe-20-table", "pe-21-table",
"pe-22-table", "pe-23-table", "pe-24-table", "pe-25-table", "pe-26-table",
"pe-27-table", "pe-28-table", "pe-29-table"]
hbase(main):012:0>
{code}
{code}
hbase(main):012:0> list_snapshots
SNAPSHOT TABLE + CREATION TIME
pe-1 TestTable (Thu Dec 13 15:37:56 -0800 2012)
pe-10 TestTable (Thu Dec 13 15:38:33 -0800 2012)
pe-11 TestTable (Thu Dec 13 15:38:38 -0800 2012)
pe-12 TestTable (Thu Dec 13 15:38:43 -0800 2012)
pe-13 TestTable (Thu Dec 13 15:38:48 -0800 2012)
pe-14 TestTable (Thu Dec 13 15:38:53 -0800 2012)
pe-15 TestTable (Thu Dec 13 15:38:58 -0800 2012)
pe-16 TestTable (Thu Dec 13 15:39:03 -0800 2012)
pe-17 TestTable (Thu Dec 13 15:39:08 -0800 2012)
pe-18 TestTable (Thu Dec 13 15:39:13 -0800 2012)
pe-19 TestTable (Thu Dec 13 15:39:18 -0800 2012)
pe-2 TestTable (Thu Dec 13 15:38:03 -0800 2012)
pe-20 TestTable (Thu Dec 13 15:39:23 -0800 2012)
pe-21 TestTable (Thu Dec 13 15:39:28 -0800 2012)
pe-22 TestTable (Thu Dec 13 15:39:36 -0800 2012)
pe-23 TestTable (Thu Dec 13 15:39:43 -0800 2012)
pe-24 TestTable (Thu Dec 13 15:39:50 -0800 2012)
pe-25 TestTable (Thu Dec 13 15:39:57 -0800 2012)
pe-26 TestTable (Thu Dec 13 15:40:04 -0800 2012)
pe-27 TestTable (Thu Dec 13 15:40:11 -0800 2012)
pe-28 TestTable (Thu Dec 13 15:40:18 -0800 2012)
pe-29 TestTable (Thu Dec 13 15:40:25 -0800 2012)
pe-3 TestTable (Thu Dec 13 15:38:06 -0800 2012)
pe-4 TestTable (Thu Dec 13 15:38:09 -0800 2012)
pe-5 TestTable (Thu Dec 13 15:38:12 -0800 2012)
pe-6 TestTable (Thu Dec 13 15:38:15 -0800 2012)
pe-7 TestTable (Thu Dec 13 15:38:18 -0800 2012)
pe-8 TestTable (Thu Dec 13 15:38:23 -0800 2012)
pe-9 TestTable (Thu Dec 13 15:38:28 -0800 2012)
29 row(s) in 0.1000 seconds
=> ["pe-1", "pe-10", "pe-11", "pe-12", "pe-13", "pe-14", "pe-15", "pe-16",
"pe-17", "pe-18", "pe-19", "pe-2", "pe-20", "pe-21", "pe-22", "pe-23", "pe-24",
"pe-25", "pe-26", "pe-27", "pe-28", "pe-29", "pe-3", "pe-4", "pe-5", "pe-6",
"pe-7", "pe-8", "pe-9"]
hbase(main):013:0>
{code}
> [shell] have list and list_snapshot return jruby string arrays.
> ---------------------------------------------------------------
>
> Key: HBASE-7353
> URL: https://issues.apache.org/jira/browse/HBASE-7353
> Project: HBase
> Issue Type: Sub-task
> Components: Client, shell
> Affects Versions: hbase-6055
> Reporter: Jonathan Hsieh
> Attachments: hbase-7353.patch
>
>
> It is really convenient to allow comamnds like list and list_snapshots return
> a jruby array of values in the hbase shell.
> it allows for nice things like this:
> {code}
> # drop all tables starting with foo
> list("foo.*").map { |t| disable t; drop t }
> {code}
> or
> {code}
> # clone all tables that start with bar
> list_snapshots("bar.*").map { |s| clone_snapshot s, s + "-table"}
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
