Reply
Highlighted
Explorer
Posts: 29
Registered: ‎01-20-2017

Hive action error while loading table . Showing invalid path error.

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;

 

Workflow xml has the input file

 

 

<param>Input_file=${InputDir}/hive_emphdfs.txt</param>

 

 

This path I am sending from job.properties file as

 

 

InputDir= ${nameNode}/user/data/emp

 

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]

 


What change should I to resolve it.

Thanks