Vijiy
Vijiy

Reputation: 1197

How to get absolute path for directory in hadoop

I have created a directory in hadoop and copied a file to that directory.

I have created a file alb_upc_retailer_sku_attr_1.txt under prvys dir

enter image description here

Now i want to create external hive table which will refer the above created file.

Is there way we can find out the root dir, under which prvys dir was created.

Upvotes: 2

Views: 1066

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191701

By default, hadoop fs -ls will look at /user/$(whoami)

If you echo that path, then -ls it, you should find the prvys directory. For example, hdfs:///user/liftadmin/

If you're using Kerberos, then the user directory depends on the ticket you've initialized the session with

Upvotes: 3

Related Questions