`hadoop dfs`和`hadoop fs`之间的区别

时间:2011-12-05 11:17:41

标签: hadoop

我看到dfs命令,然后转到文档但我无法理解 在我看来fsdfs的工作方式类似。任何一个给出确切的区别?

1 个答案:

答案 0 :(得分:51)

您可以在$ HADOOP_HOME / bin / hadoop

中看到两个命令(hadoop fs& hadoop dfs)的定义
...
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"
...

所以,它们完全一样。