I saw the dfs
command, then went to the documentation but I am unable to understand.
In my point of view fs
and dfs
working similar. Any one give exact difference?
Asked
Active
Viewed 2.2k times
31

OneCricketeer
- 179,855
- 19
- 132
- 245

Arun
- 569
- 2
- 10
- 19
-
1"FS" and "DFS" are overloaded terms and it is hard to tell what you are talking about. Can you give some examples of some similar commands that confuse you? – Donald Miner Dec 05 '11 at 12:14
-
2Can @Will or anyone explain why this was closed as off topic? I would have thought Hadoop DFS falls under "software tools used by programmers" (as listed in the FAQ). – Tim Goodman Nov 28 '12 at 17:14
-
Ah, upon viewing the edit history, I'm guessing it's because `hadoop` was not originally mentioned in the question. (Although it was in the tags?) – Tim Goodman Nov 28 '12 at 17:20
-
@TimGoodman: If I understand it correctly, this question is about configuring a data node within a hadoop server. This isn't about programming for that server. Management, versus programming. Generally, tool questions are limited to those tools used to program, such as IDEs, compilers, and the like. You can't ask how to configure a web server, but you can ask how to code HTML. – Nov 28 '12 at 17:55
-
2This is a perfectly sensible question. It is asking the difference between the shell commands `/usr/bin/hadoop fs ...` and `/usr/bin/hadoop dfs ...` – Daniel Mahler Oct 17 '14 at 08:50
1 Answers
51
You can see definitions of the two commands (hadoop fs & hadoop dfs) in $HADOOP_HOME/bin/hadoop
...
elif [ "$COMMAND" = "datanode" ] ; then
CLASS='org.apache.hadoop.hdfs.server.datanode.DataNode'
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_DATANODE_OPTS"
elif [ "$COMMAND" = "fs" ] ; then
CLASS=org.apache.hadoop.fs.FsShell
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
elif [ "$COMMAND" = "dfs" ] ; then
CLASS=org.apache.hadoop.fs.FsShell
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
elif [ "$COMMAND" = "dfsadmin" ] ; then
CLASS=org.apache.hadoop.hdfs.tools.DFSAdmin
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
...
So, they are exactly the same.

Chris Zheng
- 1,509
- 1
- 15
- 20
-
comment from @ajjain: When you read this blog entry http://nsinfra.blogspot.in/2012/06/difference-between-hadoop-dfs-and.html this explain the topic with more insight. It is the default configuration of scheme which is the cause of difference. – CharlesB Jun 01 '12 at 08:16
-
1