You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Techy Teck <co...@gmail.com> on 2012/07/27 20:34:27 UTC

/apache/hive/bin/hive: line 107: [: too many arguments error

I am trying to execute the below shell scripts using PLINK on MachineB from
MachineA(Windows Machine)

*#!/bin/bash*
*HIVE_OPTS="$HIVE_OPTS -hiveconf mapred.job.queue.name=hdmi-technology"*
*export HIVE_OPTS*
*hive -S -e 'SELECT count(*) from testingtable1' > attachment22.txt*
*
*

*Below is the way I am doing currently using plink*

C:\PLINK>plink uname@MachineB -m count.sh
Using keyboard-interactive authentication.
Password:
Using keyboard-interactive authentication.
Your Kerberos password will expire in 73 days.

*And this is the below error I am getting? And I have no idea what does
that means.. Can anyone help me out here?*
*
*
/apache/hive/bin/hive: line 107: [: too many arguments

Re: /apache/hive/bin/hive: line 107: [: too many arguments error

Posted by Techy Teck <co...@gmail.com>.
I think, I solved the below problem by using this below updated shell
script.

*#!/bin/bash*
*HIVE_OPTS="$HIVE_OPTS -hiveconf mapred.job.queue.name=hdmi-technology"*
*export HIVE_OPTS*
*HADOOP_HOME=/home/hadoop/latest*
*export HADOOP_HOME*
*hive -S -e 'SELECT count(*) from testingtable1' > attachment22.txt*


But when I open the *attachment22.txt* file in *MachineB *like this- I am
getting these outputs in attachment22.txt file. Is there anything I am
missing in my shell scripts?

*bash-3.00$ cat attachment22.txt*
*Unable to determine Hadoop version information.*
*'hadoop version' returned:*
*Error: JAVA_HOME is not set.*
*
*




On Fri, Jul 27, 2012 at 12:01 PM, Edward Capriolo <ed...@gmail.com>wrote:

> That issue likely means there are more command line arguments then
> your shell will tolerate. We have several tickets open to get hive 100
> % compatible with windows. Look though the open jira issues and see if
> any of the issues matches this problem. If not feel free to create
> one. For now getting hive to run on windows is going to be a little
> rocky.
>
> On 7/27/12, Techy Teck <co...@gmail.com> wrote:
> > I am trying to execute the below shell scripts using PLINK on MachineB
> from
> > MachineA(Windows Machine)
> >
> > *#!/bin/bash*
> > *HIVE_OPTS="$HIVE_OPTS -hiveconf mapred.job.queue.name=hdmi-technology"*
> > *export HIVE_OPTS*
> > *hive -S -e 'SELECT count(*) from testingtable1' > attachment22.txt*
> > *
> > *
> >
> > *Below is the way I am doing currently using plink*
> >
> > C:\PLINK>plink uname@MachineB -m count.sh
> > Using keyboard-interactive authentication.
> > Password:
> > Using keyboard-interactive authentication.
> > Your Kerberos password will expire in 73 days.
> >
> > *And this is the below error I am getting? And I have no idea what does
> > that means.. Can anyone help me out here?*
> > *
> > *
> > /apache/hive/bin/hive: line 107: [: too many arguments
> >
>

Re: /apache/hive/bin/hive: line 107: [: too many arguments error

Posted by Edward Capriolo <ed...@gmail.com>.
That issue likely means there are more command line arguments then
your shell will tolerate. We have several tickets open to get hive 100
% compatible with windows. Look though the open jira issues and see if
any of the issues matches this problem. If not feel free to create
one. For now getting hive to run on windows is going to be a little
rocky.

On 7/27/12, Techy Teck <co...@gmail.com> wrote:
> I am trying to execute the below shell scripts using PLINK on MachineB from
> MachineA(Windows Machine)
>
> *#!/bin/bash*
> *HIVE_OPTS="$HIVE_OPTS -hiveconf mapred.job.queue.name=hdmi-technology"*
> *export HIVE_OPTS*
> *hive -S -e 'SELECT count(*) from testingtable1' > attachment22.txt*
> *
> *
>
> *Below is the way I am doing currently using plink*
>
> C:\PLINK>plink uname@MachineB -m count.sh
> Using keyboard-interactive authentication.
> Password:
> Using keyboard-interactive authentication.
> Your Kerberos password will expire in 73 days.
>
> *And this is the below error I am getting? And I have no idea what does
> that means.. Can anyone help me out here?*
> *
> *
> /apache/hive/bin/hive: line 107: [: too many arguments
>