Hi,

 

My environment is win7 + cygwin + hadoop-0.20.2

 

hive-config,sh:

export HIVE_HOME=`dirname "$bin"`

export JAVA_HOME=/cygdrive/d/Cygwin/home/Administrator/Java/jdk1.6.0_07

export HADOOP_HOME=/cygdrive/d/Cygwin/home/Wangss/hadoop-0.20.2

 

ext\util\execHiveCmd.sh:

HADOOP_HEAPSIZE=256 

 

And the metastore is mysql

 

This is the log:

 

hive> select id from table1;

Total MapReduce jobs = 1

Launching Job 1 out of 1

Number of reduce tasks is set to 0 since there's no reduce operator

Starting Job = job_201103231648_0001, Tracking URL =
http://localhost:50030/jobd

etails.jsp?jobid=job_201103231648_0001

Kill Command = D:\Cygwin\home\Wangss\hadoop-0.20.2\/bin/hadoop job
-Dmapred.job

.tracker=localhost:9001 -kill job_201103231648_0001

2011-03-23 17:18:05,070 Stage-1 map = 0%,  reduce = 0%

2011-03-23 17:18:35,536 Stage-1 map = 100%,  reduce = 100%

Ended Job = job_201103231648_0001 with errors

 

Task with the most failures(4):

-----

Task ID:

  task_201103231648_0001_m_000000

 

URL:

 
http://localhost:50030/taskdetails.jsp?jobid=job_201103231648_0001&tipid=tas
k_

201103231648_0001_m_000000

-----

 

FAILED: Execution Error, return code 2 from
org.apache.hadoop.hive.ql.exec.ExecD

River

 

Jack

 

发件人: sangeetha s [mailto:[email protected]] 
发送时间: 2011年3月23日 16:40
收件人: [email protected]
主题: Re: Return code 2 from org.apache.hadoop.hive.ql.exec.ExecDRiver error

 

Hi,

Did you checked the field names in the table properly? Actually from the log
file it is clear that there is no element named id in the table 'table1'.
Kindly check if there is any typo. Also the alias is not required if you are
dealing with a single table with simple queries.

Kindly execute 'Describe table1;' to check the fields.

~~Cheers

2011/3/22 幻 <[email protected]>

你试过这样查么?

select a.id from table1 a;

在 2011年3月22日 下午4:31,王世森 <[email protected]>写道:

 

Hi,

 

My hive version is 0.6.0, I can query data like this: select * from table1;

 

OK

1       wss

2       chenliang

Time taken: 7.366 seconds

 

But when the sql is ‘select id from table1;’, hive throws a exception:

 

2011-03-22 14:12:46,612 Stage-1 map = 0%,  reduce = 0%

2011-03-22 14:13:13,984 Stage-1 map = 100%,  reduce = 100%

Ended Job = job_201103221411_0001 with errors

 

FAILED: Execution Error, return code 2 from
org.apache.hadoop.hive.ql.exec.ExecDriver

 

Here is the hadoop log:

java.lang.RuntimeException: java.util.NoSuchElementException

        at org.apache.hadoop.hive.ql.exec.Utilities.getMapRedWork(Utilities.
java:168)

        at
org.apache.hadoop.hive.ql.io.HiveInputFormat.init(HiveInputFormat.java:235)

        at
org.apache.hadoop.hive.ql.io.HiveInputFormat.initColumnsNeeded(HiveInputForm
at.java:311)

        at
org.apache.hadoop.hive.ql.io.HiveInputFormat.getRecordReader(HiveInputFormat
.java:217)

        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:338)

        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)

        at org.apache.hadoop.mapred.Child.main(Child.java:170)

Caused by: java.util.NoSuchElementException

        at java.util.Vector.lastElement(Vector.java:456)

        at com.sun.beans.ObjectHandler.lastExp(ObjectHandler.java:134)

        at com.sun.beans.ObjectHandler.dequeueResult(ObjectHandler.java:138)

        at java.beans.XMLDecoder.readObject(XMLDecoder.java:201)

        at
org.apache.hadoop.hive.ql.exec.Utilities.deserializeMapRedWork(Utilities.jav
a:409)

        at org.apache.hadoop.hive.ql.exec.Utilities.getMapRedWork(Utilities.
java:160)

        ... 6 more

 

So,what’s the problem?

 

 

Thanks very much

 

Jack

 

 

 




-- 



Regards,
Sangita 

Reply via email to