Correct me if I have understood your question correctly, you are having a problem in hive recognizing your default hdfs or even after you give the whole hdfs location it fails to add?
Through hive cli:
In hive you can add a file/jar below commands
If want to add local file from current host from where hive cli was opened:
hive>add file <localpath_of_file>; #give full local path if its not your home directory where file exists
hive>add file filename; #If this file is present in your home location on local host from in which opened hive cli from directly
If you want to add hdfs file, then use below process
hive>add file hdfs://<yourdefaultfs:8020>:/ user/<exmp>/file1.txt
before you add a file make sure you have the file by running
hive>dfs -ls hdfs://<yourdefaultfs:8020>:/ user/<exmp>/file1.txt (or) hadoop fs -ls hdfs://<yourdefaultfs:8020>:/ user/<exmp>/file1.txt
***Using Hue, its pretty easy, go to hive beeswax and on left pane you have add resources option, select add file and browse through your hdfs path and add it. Keep me posted if you have any issues.
I guess I was not able to explain correctly, I am trying to load a HDFS file into Hive table. However I am getting the error as per screen print. My very basic question are
1. Is the data which I need to load into Hive table, should be with delimiters which were defined while creating the tables ?mozilla.pdf
The foremost issue I'm seeing is you are not mentioning the default fs (file system) after hdfs: in your path. check your core-site.xml file and do mention your filesystem path after hdfs://.
Hive doesn't take it automatically. for example path shoudl be like hdfs://<namenode.com:8020>:/ user/cloudera/file_name.txt.
To get the correct patch of default fs , go to /usr/lib/hadoop/conf/core- site.xml and check default.fs.name property on namenode host. your path is incomplete so you are facing this issue. Thanks
Any Luck?
no man,, i got your point that I need to give full path, but till now has'nt worked out. I raised it with CDH support group
댓글 없음:
댓글 쓰기