[ 
https://issues.apache.org/jira/browse/HBASE-447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570380#action_12570380
 ] 

stack commented on HBASE-447:
-----------------------------

Currently I can do this:

{code}
durruti:~/Documents/checkouts/hbase/trunk stack$ echo "create table 'x' 
('x:');"| ./bin/hbase shellHQL, 0.2.0-dev version.Copyright (c) 2008 by udanax, 
licensed to Apache Software Foundation.Type 'help;' for usage.hql > create 
table 'x' ('x:');Creating table... Please wait.Table created successfully.hql > 
durruti:~/Documents/checkouts/hbase/trunk stack$
{code}

I can even do this and specify output format:

{code}
durruti:~/Documents/checkouts/hbase/trunk stack$ echo "show tables;"| 
./bin/hbase shell --htmlHQL, 0.2.0-dev version.Copyright (c) 2008 by udanax, 
licensed to Apache Software Foundation.Type 'help;' for usage.hql > show 
tables;<table> <tr>  <th>Name  </th>  <th>Descriptor  </th> </tr> <tr>  <td>y  
</td>  <td>name: y, families: {y:={name: y, max versions: 3, compression: NONE, 
in memory: false, block cache enabled: false, max length: 2147483647, bloom 
filter: none}}  </td> </tr> <tr>  <td>x  </td>  <td>name: x, families: 
{x:={name: x, max versions: 3, compression: NONE, in memory: false, block cache 
enabled: false, max length: 2147483647, bloom filter: none}}  </td> 
</tr></table>2 table(s) in set. (0.55 sec)hql > 
{code}

Should this issue be resolved as invalid?

> Shell reads from stdin and writes to stdout
> -------------------------------------------
>
>                 Key: HBASE-447
>                 URL: https://issues.apache.org/jira/browse/HBASE-447
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: hql
>            Reporter: Bryan Duxbury
>            Priority: Trivial
>
> Instead of HBASE-39, which would give you the ability to store queries in a 
> file and execute them from the shell, we should give the shell the ability to 
> read queries from standard input, execute the query, and then write the 
> output to standard output. 
> The advantage of this approach is that in addition to being able to store 
> queries in files, you can also script against the shell. This might mean 
> schema creation during an installation wizard, or a shell script that queries 
> a small number of rows, or whatever you can think of.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to