Skip to content

Instantly share code, notes, and snippets.

@libitte
Created February 13, 2014 12:45
Show Gist options
  • Select an option

  • Save libitte/8974469 to your computer and use it in GitHub Desktop.

Select an option

Save libitte/8974469 to your computer and use it in GitHub Desktop.
`hadoop dfs` と `hadoop fs` の違い

what's the difference between “hadoop fs” shell commands and “hdfs dfs” shell commands?

fs refers to any file system, it could be local or HDFS but dfs refers to only HDFS file system.

http://stackoverflow.com/questions/18142960/whats-the-difference-between-hadoop-fs-shell-commands-and-hdfs-dfs-shell-co

Differnce between hadoop dfs and hadoop fs

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.

http://stackoverflow.com/questions/8384479/differnce-between-hadoop-dfs-and-hadoop-fs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment