31
votes

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?

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
Can @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
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
@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. - user1228
This 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

1 Answers

51
votes

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.