Why hdfs don't have current working directory

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Why hdfs don't have current working directory

Sidharth Kumar
Hi,

Can you kindly explain me why hdfs doesnt have current directory concept. Why Hadoop is not implement to use pwd? Why command like cd and PWD cannot be implemented in hdfs?

Regards
Sidharth
Mob: +91 8197555599
LinkedIn: www.linkedin.com/in/sidharthkumar2792
Reply | Threaded
Open this post in threaded view
|

Re: Why hdfs don't have current working directory

shashwat shriparv
If you can write an HDFS shell you can have pwd and cd.


On Fri, May 26, 2017 at 3:44 PM, Sidharth Kumar <[hidden email]> wrote:
Hi,

Can you kindly explain me why hdfs doesnt have current directory concept. Why Hadoop is not implement to use pwd? Why command like cd and PWD cannot be implemented in hdfs?

Regards
Sidharth
Mob: <a href="tel:081975%2055599" value="+918197555599" target="_blank">+91 8197555599
LinkedIn: www.linkedin.com/in/sidharthkumar2792

Reply | Threaded
Open this post in threaded view
|

Re: Why hdfs don't have current working directory

Hariharan
In reply to this post by Sidharth Kumar
The concept of working directory is only useful for processes, and HDFS does not have executables. I guess what you're looking for is absolute vs relative paths (so that you can do something like hdfs cat foo instead of hdfs cat /user/me/foo). HDFS does have this to a limited extent - if your path is not absolute, it is relative from your home directory (or root if there is no home directory for your user).

Thanks,
Hariharan

On Fri, May 26, 2017 at 3:44 PM, Sidharth Kumar <[hidden email]> wrote:
Hi,

Can you kindly explain me why hdfs doesnt have current directory concept. Why Hadoop is not implement to use pwd? Why command like cd and PWD cannot be implemented in hdfs?

Regards
Sidharth
Mob: +91 8197555599
LinkedIn: www.linkedin.com/in/sidharthkumar2792

Reply | Threaded
Open this post in threaded view
|

Re: Why hdfs don't have current working directory

Sidharth Kumar
Thanks, I'll check it out. 


Sidharth

On 26-May-2017 4:10 PM, "Hariharan" <[hidden email]> wrote:
The concept of working directory is only useful for processes, and HDFS does not have executables. I guess what you're looking for is absolute vs relative paths (so that you can do something like hdfs cat foo instead of hdfs cat /user/me/foo). HDFS does have this to a limited extent - if your path is not absolute, it is relative from your home directory (or root if there is no home directory for your user).

Thanks,
Hariharan

On Fri, May 26, 2017 at 3:44 PM, Sidharth Kumar <[hidden email]> wrote:
Hi,

Can you kindly explain me why hdfs doesnt have current directory concept. Why Hadoop is not implement to use pwd? Why command like cd and PWD cannot be implemented in hdfs?

Regards
Sidharth
Mob: +91 8197555599
LinkedIn: www.linkedin.com/in/sidharthkumar2792

Reply | Threaded
Open this post in threaded view
|

Re: Why hdfs don't have current working directory

Tanvir Rahman
Hi Sidharth,
You can check the below HDFS shell tool.

Feature highlights
HDFS DFS command initiates JVM for each command call, HDFS Shell does it only once - which means great speed enhancement when you need to work with HDFS more often
- Commands can be used in a short way - eg. hdfs dfs -ls /ls / - both will work
HDFS path completion using TAB key
- you can easily add any other HDFS manipulation function
- there is a command history persisting in history log (~/.hdfs-shell/hdfs-shell.log)
- support for relative directory + commands cd and pwd
- it can be also launched as a daemon (using UNIX domain sockets)
- 100% Java, it's open source

Thanks
Tanvir



On Fri, May 26, 2017 at 9:09 AM, Sidharth Kumar <[hidden email]> wrote:
Thanks, I'll check it out. 


Sidharth

On 26-May-2017 4:10 PM, "Hariharan" <[hidden email]> wrote:
The concept of working directory is only useful for processes, and HDFS does not have executables. I guess what you're looking for is absolute vs relative paths (so that you can do something like hdfs cat foo instead of hdfs cat /user/me/foo). HDFS does have this to a limited extent - if your path is not absolute, it is relative from your home directory (or root if there is no home directory for your user).

Thanks,
Hariharan

On Fri, May 26, 2017 at 3:44 PM, Sidharth Kumar <[hidden email]> wrote:
Hi,

Can you kindly explain me why hdfs doesnt have current directory concept. Why Hadoop is not implement to use pwd? Why command like cd and PWD cannot be implemented in hdfs?

Regards
Sidharth
Mob: <a href="tel:+91%2081975%2055599" value="+918197555599" target="_blank">+91 8197555599
LinkedIn: www.linkedin.com/in/sidharthkumar2792




--
photo
Mohammad Tanvir Rahman
Teaching AssistantUniversity of Houston
<a href="tel:713%20628%203571" style="color:rgb(141,141,141);display:inline-block" target="_blank">713 628 3571 | [hidden email] | http://www2.cs.uh.edu/~tanvir/

Reply | Threaded
Open this post in threaded view
|

Re: Why hdfs don't have current working directory

Ranadip Chatterjee
You could also use the pig shell which has always had the basic posix-like navigation commands like pwd and cd.

On 26 May 2017 18:55, "Tanvir Rahman" <[hidden email]> wrote:
Hi Sidharth,
You can check the below HDFS shell tool.

Feature highlights
HDFS DFS command initiates JVM for each command call, HDFS Shell does it only once - which means great speed enhancement when you need to work with HDFS more often
- Commands can be used in a short way - eg. hdfs dfs -ls /ls / - both will work
HDFS path completion using TAB key
- you can easily add any other HDFS manipulation function
- there is a command history persisting in history log (~/.hdfs-shell/hdfs-shell.log)
- support for relative directory + commands cd and pwd
- it can be also launched as a daemon (using UNIX domain sockets)
- 100% Java, it's open source

Thanks
Tanvir



On Fri, May 26, 2017 at 9:09 AM, Sidharth Kumar <[hidden email]> wrote:
Thanks, I'll check it out. 


Sidharth

On 26-May-2017 4:10 PM, "Hariharan" <[hidden email]> wrote:
The concept of working directory is only useful for processes, and HDFS does not have executables. I guess what you're looking for is absolute vs relative paths (so that you can do something like hdfs cat foo instead of hdfs cat /user/me/foo). HDFS does have this to a limited extent - if your path is not absolute, it is relative from your home directory (or root if there is no home directory for your user).

Thanks,
Hariharan

On Fri, May 26, 2017 at 3:44 PM, Sidharth Kumar <[hidden email]> wrote:
Hi,

Can you kindly explain me why hdfs doesnt have current directory concept. Why Hadoop is not implement to use pwd? Why command like cd and PWD cannot be implemented in hdfs?

Regards
Sidharth
Mob: <a href="tel:+91%2081975%2055599" value="+918197555599" target="_blank">+91 8197555599
LinkedIn: www.linkedin.com/in/sidharthkumar2792




--
photo
Mohammad Tanvir Rahman
Teaching AssistantUniversity of Houston
<a href="tel:713%20628%203571" style="color:rgb(141,141,141);display:inline-block" target="_blank">713 628 3571 | [hidden email] | http://www2.cs.uh.edu/~tanvir/