Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between `hadoop dfs` and `hadoop fs` [closed]

Tags:

hadoop

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?

like image 731
Arun Avatar asked Dec 05 '11 11:12

Arun


People also ask

What is the difference between Hadoop FS and hdfs dfs?

FS relates to a generic file system which can point to any file systems like local, HDFS etc. But dfs is very specific to HDFS. So when we use FS it can perform operation with from/to local or hadoop distributed file system to destination . But specifying DFS operation relates to HDFS.

What does hdfs dfs stand for?

The Hadoop Distributed File System (HDFS) is the primary data storage system used by Hadoop applications. HDFS employs a NameNode and DataNode architecture to implement a distributed file system that provides high-performance access to data across highly scalable Hadoop clusters.

What is Hadoop FS commands?

The Hadoop fs shell command ls displays a list of the contents of a directory specified in the path provided by the user. It shows the name, permissions, owner, size, and modification date for each file or directories in the specified directory.

What is difference between copyFromLocal and put?

Your answer -copyFromLocal this command can copy only one source ie from local file system to destination file system. -put command can copy single and multiple sources from local file system to destination file system. copyFromLocal is similar to put command, but the source is restricted to a local file reference.


1 Answers

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.

like image 73
Chris Zheng Avatar answered Oct 09 '22 02:10

Chris Zheng