You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Malte Ehmke <ki...@googlemail.com> on 2011/01/03 13:37:54 UTC
select count(1)
Hi there,
I'am trying the jdbc example
http://wiki.apache.org/hadoop/Hive/HiveClient#JDBC
and getting that for the select count(1) query
11/01/03 12:34:35 INFO exec.MapRedTask: Generating plan file
/tmp/hive-malte/hive_2011-01-03_12-34-35_503_9118509121830839307/plan4525595563698858213.xml
11/01/03 12:34:35 INFO exec.MapRedTask: Executing: null/bin/hadoop jar
/Applications/java/hive-0.6.0/lib/hive-exec-0.6.0.jar [...]
java.io.IOException: Cannot run program "null/bin/hadoop": error=2, No such
file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:369)
at org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:176)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:107)
at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(
TaskRunner.java:55)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:633)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:506)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:384)
at org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(
HiveServer.java:114)
at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(
HiveStatement.java:195)
at de.codiacs.hive.HiveServiceTest.main(HiveServiceTest.java:64)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 12 more
11/01/03 12:34:35 ERROR exec.MapRedTask: Exception: Cannot run program
"null/bin/hadoop": error=2, No such file or directory
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.MapRedTask
11/01/03 12:34:35 ERROR ql.Driver: FAILED: Execution Error, return code 1
from org.apache.hadoop.hive.ql.exec.MapRedTask
Exception in thread "main" java.sql.SQLException: Query returned non-zero
code: 9, cause: FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.MapRedTask
at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(
HiveStatement.java:197)
Creating and inserting works.
Does anybody have a solution for that problem?
Thanks
Re: select count(1)
Posted by kiteraddict <ki...@googlemail.com>.
Hello Carl and Dilip,
yep, was the HADOOP_HOME. The jars and classpath are allright. I
didn't realize that eclipse ignores user specific system vars (under
osx). I solved it with this:
http://efreedom.com/Question/1-829749/Launch-Mac-Eclipse-Environment-Variables-Set
Thank you
Malte
2011/1/3 Carl Steinbach <ca...@cloudera.com>:
> Hi Malte,
> This is the root of your problem:
>> java.io.IOException: Cannot run program "null/bin/hadoop": error=2, No
>> such file or directory
> If you look at MapRedTask.execute() you'll see that the location of the
> hadoop script is determined based on the value of the hadoop.bin.path
> configuration property (see HiveConf.java), which defaults to
> 'System.getenv("HADOOP_HOME") + "/bin/hadoop"'. So it looks like
> $HADOOP_HOME is not actually set for your process.
> Hope this helps.
> Carl
> On Mon, Jan 3, 2011 at 10:38 AM, Dilip Joseph
> <di...@gmail.com> wrote:
>>
>> Another possibility is that some required jars are not in your classpath
>> when running your JDBC client. That could explain why everything works from
>> the Hive CLI and HiveServer.
>> I had written an article on using Hive from Jython
>> - http://csgrad.blogspot.com/2010/04/to-use-language-other-than-java-say.html.
>> Verifying that all the jars listed in the article are in your classpath may
>> help.
>> Regards
>> Dilip
>>
>> On Mon, Jan 3, 2011 at 9:18 AM, kiteraddict <ki...@googlemail.com>
>> wrote:
>>>
>>> Hi Dilip,
>>> Unfortunately, not. No special characters. Tried a symlink as well...
>>> The Path seems ok, and the strange is: select count(1) from the cli
>>> woks.
>>> I get the same error in Eclipse and in Netbeans (OSX 10.6.4). However
>>> thank you for your tip!
>>> Malte
>>>
>>> 2011/1/3 Dilip Joseph <di...@gmail.com>:
>>> > Does the full path to your hadoop installation contain a '+' character?
>>> > I
>>> > ran into a similar problem where a bug in the DataNucleus libraries
>>> > used by
>>> > hive prevented it from constructing the full path to your hadoop
>>> > installation, if the path contained a '+'. The solution was to remove
>>> > the
>>> > '+' from the path by renaming the Hadoop installation directory, or by
>>> > creating a symlink to it.
>>> > Dilip
>>> >
>>> > On Mon, Jan 3, 2011 at 4:37 AM, Malte Ehmke
>>> > <ki...@googlemail.com>
>>> > wrote:
>>> >>
>>> >> Hi there,
>>> >>
>>> >> I'am trying the jdbc example
>>> >>
>>> >> http://wiki.apache.org/hadoop/Hive/HiveClient#JDBC
>>> >>
>>> >> and getting that for the select count(1) query
>>> >>
>>> >> 11/01/03 12:34:35 INFO exec.MapRedTask: Generating plan file
>>> >>
>>> >> /tmp/hive-malte/hive_2011-01-03_12-34-35_503_9118509121830839307/plan4525595563698858213.xml
>>> >>
>>> >> 11/01/03 12:34:35 INFO exec.MapRedTask: Executing: null/bin/hadoop jar
>>> >> /Applications/java/hive-0.6.0/lib/hive-exec-0.6.0.jar [...]
>>> >>
>>> >> java.io.IOException: Cannot run program "null/bin/hadoop": error=2, No
>>> >> such file or directory
>>> >>
>>> >> at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
>>> >>
>>> >> at java.lang.Runtime.exec(Runtime.java:593)
>>> >>
>>> >> at java.lang.Runtime.exec(Runtime.java:431)
>>> >>
>>> >> at java.lang.Runtime.exec(Runtime.java:369)
>>> >>
>>> >> at
>>> >> org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:176)
>>> >>
>>> >> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:107)
>>> >>
>>> >> at
>>> >>
>>> >> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:55)
>>> >>
>>> >> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:633)
>>> >>
>>> >> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:506)
>>> >>
>>> >> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:384)
>>> >>
>>> >> at
>>> >>
>>> >> org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:114)
>>> >>
>>> >> at
>>> >>
>>> >> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:195)
>>> >>
>>> >> at de.codiacs.hive.HiveServiceTest.main(HiveServiceTest.java:64)
>>> >>
>>> >> Caused by: java.io.IOException: error=2, No such file or directory
>>> >>
>>> >> at java.lang.UNIXProcess.forkAndExec(Native Method)
>>> >>
>>> >> at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
>>> >>
>>> >> at java.lang.ProcessImpl.start(ProcessImpl.java:91)
>>> >>
>>> >> at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
>>> >>
>>> >> ... 12 more
>>> >>
>>> >> 11/01/03 12:34:35 ERROR exec.MapRedTask: Exception: Cannot run program
>>> >> "null/bin/hadoop": error=2, No such file or directory
>>> >>
>>> >> FAILED: Execution Error, return code 1 from
>>> >> org.apache.hadoop.hive.ql.exec.MapRedTask
>>> >>
>>> >> 11/01/03 12:34:35 ERROR ql.Driver: FAILED: Execution Error, return
>>> >> code 1
>>> >> from org.apache.hadoop.hive.ql.exec.MapRedTask
>>> >>
>>> >> Exception in thread "main" java.sql.SQLException: Query returned
>>> >> non-zero
>>> >> code: 9, cause: FAILED: Execution Error, return code 1 from
>>> >> org.apache.hadoop.hive.ql.exec.MapRedTask
>>> >>
>>> >> at
>>> >>
>>> >> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:197)
>>> >>
>>> >> Creating and inserting works.
>>> >>
>>> >> Does anybody have a solution for that problem?
>>> >>
>>> >> Thanks
>>> >
>>> >
>>> > --
>>> > _________________________________________
>>> > Dilip Antony Joseph
>>> > http://csgrad.blogspot.com
>>> > http://www.marydilip.info
>>> >
>>
>>
>>
>> --
>> _________________________________________
>> Dilip Antony Joseph
>> http://csgrad.blogspot.com
>> http://www.marydilip.info
>
>
Re: select count(1)
Posted by Carl Steinbach <ca...@cloudera.com>.
Hi Malte,
This is the root of your problem:
> java.io.IOException: Cannot run program "null/bin/hadoop": error=2, No
such file or directory
If you look at MapRedTask.execute() you'll see that the location of the
hadoop script is determined based on the value of the hadoop.bin.path
configuration property (see HiveConf.java), which defaults to
'System.getenv("HADOOP_HOME") + "/bin/hadoop"'. So it looks like
$HADOOP_HOME is not actually set for your process.
Hope this helps.
Carl
On Mon, Jan 3, 2011 at 10:38 AM, Dilip Joseph <dilip.antony.joseph@gmail.com
> wrote:
> Another possibility is that some required jars are not in your classpath
> when running your JDBC client. That could explain why everything works from
> the Hive CLI and HiveServer.
>
> I had written an article on using Hive from Jython -
> http://csgrad.blogspot.com/2010/04/to-use-language-other-than-java-say.html.
> Verifying that all the jars listed in the article are in your classpath may
> help.
>
> Regards
>
> Dilip
>
>
> On Mon, Jan 3, 2011 at 9:18 AM, kiteraddict <ki...@googlemail.com>wrote:
>
>> Hi Dilip,
>> Unfortunately, not. No special characters. Tried a symlink as well...
>> The Path seems ok, and the strange is: select count(1) from the cli
>> woks.
>> I get the same error in Eclipse and in Netbeans (OSX 10.6.4). However
>> thank you for your tip!
>> Malte
>>
>> 2011/1/3 Dilip Joseph <di...@gmail.com>:
>> > Does the full path to your hadoop installation contain a '+' character?
>> I
>> > ran into a similar problem where a bug in the DataNucleus libraries used
>> by
>> > hive prevented it from constructing the full path to your hadoop
>> > installation, if the path contained a '+'. The solution was to remove
>> the
>> > '+' from the path by renaming the Hadoop installation directory, or by
>> > creating a symlink to it.
>> > Dilip
>> >
>> > On Mon, Jan 3, 2011 at 4:37 AM, Malte Ehmke <kiteraddict@googlemail.com
>> >
>> > wrote:
>> >>
>> >> Hi there,
>> >>
>> >> I'am trying the jdbc example
>> >>
>> >> http://wiki.apache.org/hadoop/Hive/HiveClient#JDBC
>> >>
>> >> and getting that for the select count(1) query
>> >>
>> >> 11/01/03 12:34:35 INFO exec.MapRedTask: Generating plan file
>> >>
>> /tmp/hive-malte/hive_2011-01-03_12-34-35_503_9118509121830839307/plan4525595563698858213.xml
>> >>
>> >> 11/01/03 12:34:35 INFO exec.MapRedTask: Executing: null/bin/hadoop jar
>> >> /Applications/java/hive-0.6.0/lib/hive-exec-0.6.0.jar [...]
>> >>
>> >> java.io.IOException: Cannot run program "null/bin/hadoop": error=2, No
>> >> such file or directory
>> >>
>> >> at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
>> >>
>> >> at java.lang.Runtime.exec(Runtime.java:593)
>> >>
>> >> at java.lang.Runtime.exec(Runtime.java:431)
>> >>
>> >> at java.lang.Runtime.exec(Runtime.java:369)
>> >>
>> >> at
>> org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:176)
>> >>
>> >> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:107)
>> >>
>> >> at
>> >>
>> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:55)
>> >>
>> >> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:633)
>> >>
>> >> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:506)
>> >>
>> >> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:384)
>> >>
>> >> at
>> >>
>> org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:114)
>> >>
>> >> at
>> >>
>> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:195)
>> >>
>> >> at de.codiacs.hive.HiveServiceTest.main(HiveServiceTest.java:64)
>> >>
>> >> Caused by: java.io.IOException: error=2, No such file or directory
>> >>
>> >> at java.lang.UNIXProcess.forkAndExec(Native Method)
>> >>
>> >> at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
>> >>
>> >> at java.lang.ProcessImpl.start(ProcessImpl.java:91)
>> >>
>> >> at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
>> >>
>> >> ... 12 more
>> >>
>> >> 11/01/03 12:34:35 ERROR exec.MapRedTask: Exception: Cannot run program
>> >> "null/bin/hadoop": error=2, No such file or directory
>> >>
>> >> FAILED: Execution Error, return code 1 from
>> >> org.apache.hadoop.hive.ql.exec.MapRedTask
>> >>
>> >> 11/01/03 12:34:35 ERROR ql.Driver: FAILED: Execution Error, return code
>> 1
>> >> from org.apache.hadoop.hive.ql.exec.MapRedTask
>> >>
>> >> Exception in thread "main" java.sql.SQLException: Query returned
>> non-zero
>> >> code: 9, cause: FAILED: Execution Error, return code 1 from
>> >> org.apache.hadoop.hive.ql.exec.MapRedTask
>> >>
>> >> at
>> >>
>> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:197)
>> >>
>> >> Creating and inserting works.
>> >>
>> >> Does anybody have a solution for that problem?
>> >>
>> >> Thanks
>> >
>> >
>> > --
>> > _________________________________________
>> > Dilip Antony Joseph
>> > http://csgrad.blogspot.com
>> > http://www.marydilip.info
>> >
>>
>
>
>
> --
> _________________________________________
> Dilip Antony Joseph
> http://csgrad.blogspot.com
> http://www.marydilip.info
>
Re: select count(1)
Posted by Dilip Joseph <di...@gmail.com>.
Another possibility is that some required jars are not in your classpath
when running your JDBC client. That could explain why everything works from
the Hive CLI and HiveServer.
I had written an article on using Hive from Jython -
http://csgrad.blogspot.com/2010/04/to-use-language-other-than-java-say.html.
Verifying that all the jars listed in the article are in your classpath may
help.
Regards
Dilip
On Mon, Jan 3, 2011 at 9:18 AM, kiteraddict <ki...@googlemail.com>wrote:
> Hi Dilip,
> Unfortunately, not. No special characters. Tried a symlink as well...
> The Path seems ok, and the strange is: select count(1) from the cli
> woks.
> I get the same error in Eclipse and in Netbeans (OSX 10.6.4). However
> thank you for your tip!
> Malte
>
> 2011/1/3 Dilip Joseph <di...@gmail.com>:
> > Does the full path to your hadoop installation contain a '+' character?
> I
> > ran into a similar problem where a bug in the DataNucleus libraries used
> by
> > hive prevented it from constructing the full path to your hadoop
> > installation, if the path contained a '+'. The solution was to remove
> the
> > '+' from the path by renaming the Hadoop installation directory, or by
> > creating a symlink to it.
> > Dilip
> >
> > On Mon, Jan 3, 2011 at 4:37 AM, Malte Ehmke <ki...@googlemail.com>
> > wrote:
> >>
> >> Hi there,
> >>
> >> I'am trying the jdbc example
> >>
> >> http://wiki.apache.org/hadoop/Hive/HiveClient#JDBC
> >>
> >> and getting that for the select count(1) query
> >>
> >> 11/01/03 12:34:35 INFO exec.MapRedTask: Generating plan file
> >>
> /tmp/hive-malte/hive_2011-01-03_12-34-35_503_9118509121830839307/plan4525595563698858213.xml
> >>
> >> 11/01/03 12:34:35 INFO exec.MapRedTask: Executing: null/bin/hadoop jar
> >> /Applications/java/hive-0.6.0/lib/hive-exec-0.6.0.jar [...]
> >>
> >> java.io.IOException: Cannot run program "null/bin/hadoop": error=2, No
> >> such file or directory
> >>
> >> at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
> >>
> >> at java.lang.Runtime.exec(Runtime.java:593)
> >>
> >> at java.lang.Runtime.exec(Runtime.java:431)
> >>
> >> at java.lang.Runtime.exec(Runtime.java:369)
> >>
> >> at
> org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:176)
> >>
> >> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:107)
> >>
> >> at
> >>
> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:55)
> >>
> >> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:633)
> >>
> >> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:506)
> >>
> >> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:384)
> >>
> >> at
> >>
> org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:114)
> >>
> >> at
> >>
> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:195)
> >>
> >> at de.codiacs.hive.HiveServiceTest.main(HiveServiceTest.java:64)
> >>
> >> Caused by: java.io.IOException: error=2, No such file or directory
> >>
> >> at java.lang.UNIXProcess.forkAndExec(Native Method)
> >>
> >> at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
> >>
> >> at java.lang.ProcessImpl.start(ProcessImpl.java:91)
> >>
> >> at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
> >>
> >> ... 12 more
> >>
> >> 11/01/03 12:34:35 ERROR exec.MapRedTask: Exception: Cannot run program
> >> "null/bin/hadoop": error=2, No such file or directory
> >>
> >> FAILED: Execution Error, return code 1 from
> >> org.apache.hadoop.hive.ql.exec.MapRedTask
> >>
> >> 11/01/03 12:34:35 ERROR ql.Driver: FAILED: Execution Error, return code
> 1
> >> from org.apache.hadoop.hive.ql.exec.MapRedTask
> >>
> >> Exception in thread "main" java.sql.SQLException: Query returned
> non-zero
> >> code: 9, cause: FAILED: Execution Error, return code 1 from
> >> org.apache.hadoop.hive.ql.exec.MapRedTask
> >>
> >> at
> >>
> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:197)
> >>
> >> Creating and inserting works.
> >>
> >> Does anybody have a solution for that problem?
> >>
> >> Thanks
> >
> >
> > --
> > _________________________________________
> > Dilip Antony Joseph
> > http://csgrad.blogspot.com
> > http://www.marydilip.info
> >
>
--
_________________________________________
Dilip Antony Joseph
http://csgrad.blogspot.com
http://www.marydilip.info
Re: select count(1)
Posted by kiteraddict <ki...@googlemail.com>.
To specify things: I run the embedded mode with the url:
"jdbc:hive://". If I take "jdbc:hive://localhost:10000/default" with
the hiveserver mode, the error will not occur and everything's fine.
But I need multithreated access to my data.
Malte
2011/1/3 kiteraddict <ki...@googlemail.com>:
> Hi Dilip,
> Unfortunately, not. No special characters. Tried a symlink as well...
> The Path seems ok, and the strange is: select count(1) from the cli
> woks.
> I get the same error in Eclipse and in Netbeans (OSX 10.6.4). However
> thank you for your tip!
> Malte
>
> 2011/1/3 Dilip Joseph <di...@gmail.com>:
>> Does the full path to your hadoop installation contain a '+' character? I
>> ran into a similar problem where a bug in the DataNucleus libraries used by
>> hive prevented it from constructing the full path to your hadoop
>> installation, if the path contained a '+'. The solution was to remove the
>> '+' from the path by renaming the Hadoop installation directory, or by
>> creating a symlink to it.
>> Dilip
>>
>> On Mon, Jan 3, 2011 at 4:37 AM, Malte Ehmke <ki...@googlemail.com>
>> wrote:
>>>
>>> Hi there,
>>>
>>> I'am trying the jdbc example
>>>
>>> http://wiki.apache.org/hadoop/Hive/HiveClient#JDBC
>>>
>>> and getting that for the select count(1) query
>>>
>>> 11/01/03 12:34:35 INFO exec.MapRedTask: Generating plan file
>>> /tmp/hive-malte/hive_2011-01-03_12-34-35_503_9118509121830839307/plan4525595563698858213.xml
>>>
>>> 11/01/03 12:34:35 INFO exec.MapRedTask: Executing: null/bin/hadoop jar
>>> /Applications/java/hive-0.6.0/lib/hive-exec-0.6.0.jar [...]
>>>
>>> java.io.IOException: Cannot run program "null/bin/hadoop": error=2, No
>>> such file or directory
>>>
>>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
>>>
>>> at java.lang.Runtime.exec(Runtime.java:593)
>>>
>>> at java.lang.Runtime.exec(Runtime.java:431)
>>>
>>> at java.lang.Runtime.exec(Runtime.java:369)
>>>
>>> at org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:176)
>>>
>>> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:107)
>>>
>>> at
>>> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:55)
>>>
>>> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:633)
>>>
>>> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:506)
>>>
>>> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:384)
>>>
>>> at
>>> org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:114)
>>>
>>> at
>>> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:195)
>>>
>>> at de.codiacs.hive.HiveServiceTest.main(HiveServiceTest.java:64)
>>>
>>> Caused by: java.io.IOException: error=2, No such file or directory
>>>
>>> at java.lang.UNIXProcess.forkAndExec(Native Method)
>>>
>>> at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
>>>
>>> at java.lang.ProcessImpl.start(ProcessImpl.java:91)
>>>
>>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
>>>
>>> ... 12 more
>>>
>>> 11/01/03 12:34:35 ERROR exec.MapRedTask: Exception: Cannot run program
>>> "null/bin/hadoop": error=2, No such file or directory
>>>
>>> FAILED: Execution Error, return code 1 from
>>> org.apache.hadoop.hive.ql.exec.MapRedTask
>>>
>>> 11/01/03 12:34:35 ERROR ql.Driver: FAILED: Execution Error, return code 1
>>> from org.apache.hadoop.hive.ql.exec.MapRedTask
>>>
>>> Exception in thread "main" java.sql.SQLException: Query returned non-zero
>>> code: 9, cause: FAILED: Execution Error, return code 1 from
>>> org.apache.hadoop.hive.ql.exec.MapRedTask
>>>
>>> at
>>> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:197)
>>>
>>> Creating and inserting works.
>>>
>>> Does anybody have a solution for that problem?
>>>
>>> Thanks
>>
>>
>> --
>> _________________________________________
>> Dilip Antony Joseph
>> http://csgrad.blogspot.com
>> http://www.marydilip.info
>>
>
Re: select count(1)
Posted by kiteraddict <ki...@googlemail.com>.
Hi Dilip,
Unfortunately, not. No special characters. Tried a symlink as well...
The Path seems ok, and the strange is: select count(1) from the cli
woks.
I get the same error in Eclipse and in Netbeans (OSX 10.6.4). However
thank you for your tip!
Malte
2011/1/3 Dilip Joseph <di...@gmail.com>:
> Does the full path to your hadoop installation contain a '+' character? I
> ran into a similar problem where a bug in the DataNucleus libraries used by
> hive prevented it from constructing the full path to your hadoop
> installation, if the path contained a '+'. The solution was to remove the
> '+' from the path by renaming the Hadoop installation directory, or by
> creating a symlink to it.
> Dilip
>
> On Mon, Jan 3, 2011 at 4:37 AM, Malte Ehmke <ki...@googlemail.com>
> wrote:
>>
>> Hi there,
>>
>> I'am trying the jdbc example
>>
>> http://wiki.apache.org/hadoop/Hive/HiveClient#JDBC
>>
>> and getting that for the select count(1) query
>>
>> 11/01/03 12:34:35 INFO exec.MapRedTask: Generating plan file
>> /tmp/hive-malte/hive_2011-01-03_12-34-35_503_9118509121830839307/plan4525595563698858213.xml
>>
>> 11/01/03 12:34:35 INFO exec.MapRedTask: Executing: null/bin/hadoop jar
>> /Applications/java/hive-0.6.0/lib/hive-exec-0.6.0.jar [...]
>>
>> java.io.IOException: Cannot run program "null/bin/hadoop": error=2, No
>> such file or directory
>>
>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
>>
>> at java.lang.Runtime.exec(Runtime.java:593)
>>
>> at java.lang.Runtime.exec(Runtime.java:431)
>>
>> at java.lang.Runtime.exec(Runtime.java:369)
>>
>> at org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:176)
>>
>> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:107)
>>
>> at
>> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:55)
>>
>> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:633)
>>
>> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:506)
>>
>> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:384)
>>
>> at
>> org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:114)
>>
>> at
>> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:195)
>>
>> at de.codiacs.hive.HiveServiceTest.main(HiveServiceTest.java:64)
>>
>> Caused by: java.io.IOException: error=2, No such file or directory
>>
>> at java.lang.UNIXProcess.forkAndExec(Native Method)
>>
>> at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
>>
>> at java.lang.ProcessImpl.start(ProcessImpl.java:91)
>>
>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
>>
>> ... 12 more
>>
>> 11/01/03 12:34:35 ERROR exec.MapRedTask: Exception: Cannot run program
>> "null/bin/hadoop": error=2, No such file or directory
>>
>> FAILED: Execution Error, return code 1 from
>> org.apache.hadoop.hive.ql.exec.MapRedTask
>>
>> 11/01/03 12:34:35 ERROR ql.Driver: FAILED: Execution Error, return code 1
>> from org.apache.hadoop.hive.ql.exec.MapRedTask
>>
>> Exception in thread "main" java.sql.SQLException: Query returned non-zero
>> code: 9, cause: FAILED: Execution Error, return code 1 from
>> org.apache.hadoop.hive.ql.exec.MapRedTask
>>
>> at
>> org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:197)
>>
>> Creating and inserting works.
>>
>> Does anybody have a solution for that problem?
>>
>> Thanks
>
>
> --
> _________________________________________
> Dilip Antony Joseph
> http://csgrad.blogspot.com
> http://www.marydilip.info
>
Re: select count(1)
Posted by Dilip Joseph <di...@gmail.com>.
Does the full path to your hadoop installation contain a '+' character? I
ran into a similar problem where a bug in the DataNucleus libraries used by
hive prevented it from constructing the full path to your hadoop
installation, if the path contained a '+'. The solution was to remove the
'+' from the path by renaming the Hadoop installation directory, or by
creating a symlink to it.
Dilip
On Mon, Jan 3, 2011 at 4:37 AM, Malte Ehmke <ki...@googlemail.com>wrote:
> Hi there,
>
>
> I'am trying the jdbc example
>
> http://wiki.apache.org/hadoop/Hive/HiveClient#JDBC
>
> and getting that for the select count(1) query
>
> 11/01/03 12:34:35 INFO exec.MapRedTask: Generating plan file
> /tmp/hive-malte/hive_2011-01-03_12-34-35_503_9118509121830839307/plan4525595563698858213.xml
>
> 11/01/03 12:34:35 INFO exec.MapRedTask: Executing: null/bin/hadoop jar
> /Applications/java/hive-0.6.0/lib/hive-exec-0.6.0.jar [...]
>
> java.io.IOException: Cannot run program "null/bin/hadoop": error=2, No
> such file or directory
>
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
>
> at java.lang.Runtime.exec(Runtime.java:593)
>
> at java.lang.Runtime.exec(Runtime.java:431)
>
> at java.lang.Runtime.exec(Runtime.java:369)
>
> at org.apache.hadoop.hive.ql.exec.MapRedTask.execute(MapRedTask.java:176)
>
> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:107)
>
> at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(
> TaskRunner.java:55)
>
> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:633)
>
> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:506)
>
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:384)
>
> at org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(
> HiveServer.java:114)
>
> at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(
> HiveStatement.java:195)
>
> at de.codiacs.hive.HiveServiceTest.main(HiveServiceTest.java:64)
>
> Caused by: java.io.IOException: error=2, No such file or directory
>
> at java.lang.UNIXProcess.forkAndExec(Native Method)
>
> at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
>
> at java.lang.ProcessImpl.start(ProcessImpl.java:91)
>
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
>
> ... 12 more
>
> 11/01/03 12:34:35 ERROR exec.MapRedTask: Exception: Cannot run program
> "null/bin/hadoop": error=2, No such file or directory
>
> FAILED: Execution Error, return code 1 from
> org.apache.hadoop.hive.ql.exec.MapRedTask
>
> 11/01/03 12:34:35 ERROR ql.Driver: FAILED: Execution Error, return code 1
> from org.apache.hadoop.hive.ql.exec.MapRedTask
>
> Exception in thread "main" java.sql.SQLException: Query returned non-zero
> code: 9, cause: FAILED: Execution Error, return code 1 from
> org.apache.hadoop.hive.ql.exec.MapRedTask
>
> at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuery(
> HiveStatement.java:197)
>
>
> Creating and inserting works.
>
> Does anybody have a solution for that problem?
>
>
>
> Thanks
>
--
_________________________________________
Dilip Antony Joseph
http://csgrad.blogspot.com
http://www.marydilip.info