You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Ranjini Rathinam <ra...@gmail.com> on 2014/01/10 08:21:34 UTC

Fwd: passing Xml using hive

 Hi,

This is my xml file

<Company>
<Employee>
<id>100</id>
<ename>ranjini</ename>
<dept>IT1</dept>
<sal>123456</sal>
<location>nextlevel1</location>
<Address>
<Home>Chennai1</Home>
<Office>Navallur1</Office>
</Address>
</Employee>
<Employee>
<id>1001</id>
<ename>ranjinikumar</ename>
<dept>IT</dept>
<sal>1234516</sal>
<location>nextlevel</location>
<Address>
<Home>Chennai</Home>
<Office>Navallur</Office>
</Address>
</Employee>
</Company>


In hive shell , i use xpath

 hive> select xpath(str,'/Company/Employee/ename/text()') from hivexml;
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_201401081034_0019, Tracking URL =
http://localhost:50030/jobdetails.jsp?jobid=job_201401081034_0019 Kill
Command = /usr/local/hadoop/bin/../bin/hadoop job
-Dmapred.job.tracker=localhost:4441 -kill job_201401081034_0019 2014-01-08
14:18:18,199 Stage-1 map = 0%, reduce = 0%
2014-01-08 14:18:45,294 Stage-1 map = 100%, reduce = 100%
Ended Job = job_201401081034_0019 with errors
 FAILED: Execution Error, return code 2 from
org.apache.hadoop.hive.ql.exec.MapRedTask hive>

When check in the URL of tasktracker and jobtracker i did not find any
error log there.


Please help to fix this , What is correct step to solve.

Thanks in advance.

Ranjini R

Re: passing Xml using hive

Posted by Ranjini Rathinam <ra...@gmail.com>.
>
>   Hi,
>
> This is my xml file
>
> <Company>
> <Employee>
> <id>100</id>
> <ename>ranjini</ename>
> <dept>IT1</dept>
> <sal>123456</sal>
> <location>nextlevel1</location>
> <Address>
> <Home>Chennai1</Home>
> <Office>Navallur1</Office>
> </Address>
> </Employee>
> <Employee>
> <id>1001</id>
> <ename>ranjinikumar</ename>
> <dept>IT</dept>
> <sal>1234516</sal>
> <location>nextlevel</location>
> <Address>
> <Home>Chennai</Home>
> <Office>Navallur</Office>
> </Address>
> </Employee>
> </Company>
>
>
> In hive shell , i use xpath
>
>  hive> select xpath(str,'/Company/Employee/ename/text()') from hivexml;
> 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_201401081034_0019, Tracking URL =
> http://localhost:50030/jobdetails.jsp?jobid=job_201401081034_0019 Kill
> Command = /usr/local/hadoop/bin/../bin/hadoop job
> -Dmapred.job.tracker=localhost:4441 -kill job_201401081034_0019 2014-01-08
> 14:18:18,199 Stage-1 map = 0%, reduce = 0%
> 2014-01-08 14:18:45,294 Stage-1 map = 100%, reduce = 100%
> Ended Job = job_201401081034_0019 with errors
>  FAILED: Execution Error, return code 2 from
> org.apache.hadoop.hive.ql.exec.MapRedTask hive>
>
> When check in the URL of tasktracker and jobtracker i did not find any
> error log there.
>
>
> Please help to fix this , What is correct step to solve.
>
> Thanks in advance.
>
> Ranjini R
>
>
>
>
>