Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Oozi Hive action error while loading managed table .

Highlighted

Oozi Hive action error while loading managed table .

Explorer

Hi,
I created hive query script and loading via oozi.
If I execute the Hive query script through command line , it runs fine.
But when I am loading through Oozi hive action ,
The Query script I have here it is. I am getting error on line,
load data inpath '${Input_file}' into table test.employee;

 

create table IF NOT EXISTS test.employee (name string,sal float, dept string)
row format delimited
fields terminated by ',';

load data inpath '${Input_file}' into table test.employee;

insert overwrite directory '${OutputDir}'
select name, sal,dept
from test.employee;

In job properties
I have

nameNode = hdfs://localhost:8020

 

Now when I see describe extended table it shows.

location:hdfs://quickstart.cloudera:8020/user/hive/warehouse/test.db/employee
instead of hdfs://localhost:8020/user/hive/warehouse/test.db/employee

I have hive-site.xml and hive-default.xml in same loaction as workflow.xml file.

When I am running my script through oozi,
I am getting following error.

FAILED: SemanticException [Error 10028]: Line 3:17 Path is not legal 
''hdfs://localhost:8020/user/data/emp/hive_emphdfs.txt'':
Move from: hdfs://localhost:8020/user/data/emp/hive_emphdfs.txt
to: hdfs://quickstart.cloudera:8020/user/hive/warehouse/test.db/employee is not valid.
Please check that values for params "default.fs.name" and "hive.metastore.warehouse.dir" do not conflict. Intercepting System.exit(10028) Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.HiveMain], exit code [10028]

 

One thing  see in /etc/hosts file

127.0.0.1	localhost	localhost.domain
192.168.0.25	quickstart.cloudera	quickstart

Why to lines in cloudera vm. is this correct ? 

 

 

Thanks

Dmishra