hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuti Awasthi <stutiawas...@hcl.com>
Subject RE: Create hbase table using script
Date Thu, 02 Feb 2012 10:42:02 GMT
HI Frederic,
I tested the script suggested by you. It is working fine.


-----Original Message-----
From: Frédéric Fondement [mailto:frederic.fondement@uha.fr] 
Sent: Wednesday, January 25, 2012 6:07 PM
To: user@hbase.apache.org
Subject: Re: Create hbase table using script

Sorry, I sent last mail too soon:

you also need to change your script to:

echo "create '$1','cf1'"

piping (i.e. running created.sh test1 | hbase shell) should also support multiple lines echoed
by created.sh

Le 25/01/12 11:01, Christian Schäfer a écrit :
>      Tried what you did.
> There is furthermore printed that seems to me that hbase shell may not 
> have the additional arguments (created.sh test1):
> ArgumentError: wrong number of arguments (2 for 0)
>     start at /usr/lib/hbase/bin/../bin/hirb.rb:169
>    (root) at /usr/lib/hbase/bin/../bin/hirb.rb:183
> Where did you read that shellscript could be passed to the hbase shell command?
>        Von: Stuti Awasthi<stutiawasthi@hcl.com>
>   An:
>   "hbase-user@hadoop.apache.org"<hbase-user@hadoop.apache.org>
>   Gesendet: 8:34 Mittwoch, 25.Januar 2012
>   Betreff: Create hbase table using script
> Hi all,
> I am trying to create hbase tables using shell script. The table name will come as argument
to the script like:
> $HBASE_HOME/bin/hbase shell created.sh test1
> Here test1 is the table name. When in my script I want to access as normal argument I
get the error:
> Script:
> Name=$1
> create "$Name",'cf1'
>   java.lang.IllegalArgumentException: Illegal character<36>  at 0.
> User-space table names can only contain 'word characters': i.e.
> [a-zA-Z_0-9-.]: $Name
> How can I fix this using script
>   ?
> Thnx
> ________________________________
> ----------------------------------------------------------------------
> -------------------------------------------------
> The contents of this e-mail and any attachment(s) are confidential and intended for the
named recipient(s) only.
> It shall not attach any liability on the originator or HCL or its 
> affiliates. Any views or opinions presented in this email are solely those of the author
and may not necessarily reflect the opinions of HCL or its affiliates.
> Any form of reproduction, dissemination, copying, disclosure, 
> modification, distribution and / or publication of this message 
> without the prior written consent of the author of this e-mail is 
> strictly prohibited. If you have received this email in error please delete it and notify
the sender immediately. Before opening any mail and attachments please check them for viruses
>   defect.
> ----------------------------------------------------------------------
> -------------------------------------------------

View raw message