You can see definitions of the two commands (hadoop fs & hadoop dfs) in
可以看一下hadoop的源代码
$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.
所以,发现两者是完全一样的功能。
谢谢
hadoop fs:使用面广操作任何文件系统
hadoop dfs与hdfs dfs:能操作hdfs文件系统相关(包括与local fs间操作)前者已经deprecated般使用者
following are the three commands which appears same but have minute differences
hadoop fs {args}
hadoop dfs {args}
hdfs dfs {args}
hadoop fs
fs relates to a generic file system which can point to any file systems like local, hdfs etc. so this can be used when you are dealing with different file systems such as local fs, hftp fs, s3 fs, and others
hadoop dfs
dfs is very specific to hdfs. would work for operation relates to hdfs. this has been deprecated and we should use hdfs dfs instead.
hdfs dfs
same as 2nd i.e would work for all the operations related to hdfs and is the recommended command instead of hadoop dfs
below is the list categorized as hdfs commands.
**#hdfs commands**
namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt|oiv|dfsgroups
so even if you use hadoop dfs , it will look lo...hadoop fs:使用面广操作任何文件系统
hadoop dfs与hdfs dfs:能操作hdfs文件系统相关(包括与local fs间操作)前者已经deprecated般使用者
following are the three commands which appears same but have minute differences
hadoop fs {args}
hadoop dfs {args}
hdfs dfs {args}
hadoop fs
fs relates to a generic file system which can point to any file systems like local, hdfs etc. so this can be used when you are dealing with different file systems such as local fs, hftp fs, s3 fs, and others
hadoop dfs
dfs is very specific to hdfs. would work for operation relates to hdfs. this has been deprecated and we should use hdfs dfs instead.
hdfs dfs
same as 2nd i.e would work for all the operations related to hdfs and is the recommended command instead of hadoop dfs
below is the list categorized as hdfs commands.
**#hdfs commands**
namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt|oiv|dfsgroups
so even if you use hadoop dfs , it will look locate hdfs and delegate that command to hdfs dfs
Hadoop|
Apache Pig|
Apache Kafka|
Apache Storm|
Impala|
Zookeeper|
SAS|
TensorFlow|
人工智能基础|
Apache Kylin|
Openstack|
Flink|
MapReduce|
大数据|
云计算|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....