Thanks Frederic,
Sorry as I was out of town I was not able to check what you suggested. I will 
try and come up again if I faces any issues. 
Thanks

-----Original Message-----
From: Frédéric Fondement [mailto:[email protected]] 
Sent: Wednesday, January 25, 2012 6:07 PM
To: [email protected]
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<[email protected]>
>   An:
>   "[email protected]"<[email protected]>
>   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'
>
> ERROR:
>   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
>
> ________________________________
> ::DISCLAIMER::
> ----------------------------------------------------------------------
> -------------------------------------------------
>
> 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 and
>   defect.
>
> ----------------------------------------------------------------------
> -------------------------------------------------
>
>
>                                                       

Reply via email to