Created 12-03-2016 04:45 PM
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:hdfs://quickstart.cloudera:8020/user/cloudera/emp1/emp.txt is not a directory or unable to create one)
Created 12-03-2016 05:21 PM
can you try create table like this
create external table emp1(eno int,
ename string,
sal string)
row format delimited
fields terminate by '~'
location '/tmp';
this will create a table with name emp1 on hdfs under /tmp location. seems you are following some cloudera documentation to create table on hdp platform but user cloudera won't exist on HDP thats why you are facing problem.
Created 12-03-2016 05:12 PM
can you post me command which you are using to create table, do you have a permission on directory where you are creating external table
Created 12-03-2016 05:15 PM
When you are trying to define the "LOCATION" then you should remember:
1. the "/user/cloudera/emp1" directory exist in your HDFS filesystem
2. The "/user/cloudera/emp1" in your HDFS has the file "emp.txt"
Can you please run the following command in your HDFS and share the results?
hdfs dfs -ls /user/cloudera/emp1
.
Created 12-03-2016 05:30 PM
Last login: Sat Dec 3 07:58:20 2016 from 192.168.203.1 [cloudera@quickstart ~]$ hdfs dfs -ls /user/cloudera Found 5 items -rwxrwxrwx 1 cloudera cloudera 28 2016-12-03 05:41 /user/cloudera/emp.txt drwxr-xr-x - cloudera cloudera 0 2016-12-03 08:08 /user/cloudera/emp1 -rw-r--r-- 1 cloudera cloudera 67 2016-12-03 01:35 /user/cloudera/file3.txt -rw-r--r-- 1 cloudera cloudera 0 2016-12-03 02:36 /user/cloudera/merge.txt drwxr-xr-x - cloudera cloudera 0 2016-12-03 02:21 /user/cloudera/ram
Created 12-03-2016 05:17 PM
Hi Raj,
create external table emp1(eno int,
ename string,
sal string)
row format delimited
fields terminate by '~'
location '/user/cloudera/hadoop_practise/emp1/emp.txt';
Created 12-03-2016 05:39 PM
@Ram Mit seems you are trying cloudera distribution, can you try running the same command from cloudera user with a small change in table location like this /user/cloudera/hadoop_practise/emp1
Created 12-03-2016 05:21 PM
can you try create table like this
create external table emp1(eno int,
ename string,
sal string)
row format delimited
fields terminate by '~'
location '/tmp';
this will create a table with name emp1 on hdfs under /tmp location. seems you are following some cloudera documentation to create table on hdp platform but user cloudera won't exist on HDP thats why you are facing problem.
Created 12-03-2016 05:39 PM
will it load data without loading from specified location?
Created 12-03-2016 05:43 PM
sorry I could not get your ask,could you please clarify
Created 12-03-2016 05:47 PM
table is created...but data is not loaded from EMP1(DIRECT0RY)...In this directory there is emp.txt file