Hadoop:hadoop fs、hadoop dfs与hdfs dfs命令的区别
http://blog.csdn.net/pipisorry/article/details/51340838
'Hadoop DFS'和'Hadoop FS'的区别
> hadoop fs
why we have two different syntaxes for a common purpose
为什么会对同一个功能提供两种命令标记?
命令的定义
it seems like there's no difference between the two syntaxes. If we look at the definitions of the two commands (hadoop fs and 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"
...
貌似更有道理的解释
Unconvinced, and these excerpts made more sense to me:
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.
这个理由并不完全信服,下面这个解释貌似更有道理:
Hadoop文档对这两个不同的shell的描述
下面是两个摘录Hadoop文档,描述这两个不同的shell。
- FS Shell
- The FileSystem (FS) shell is invoked by bin/hadoop fs. All the FS shell commands take path URIs as arguments. The URI format is scheme://autority/path. For HDFS the scheme is hdfs, and for the local filesystem the scheme is file. The scheme and authority are optional. If not specified, the default scheme specified in the configuration is used. An HDFS file or directory such as /parent/child can be specified as hdfs://namenodehost/parent/child or simply as /parent/child (given that your configuration is set to point to hdfs://namenodehost). Most of the commands in FS shell behave like corresponding Unix commands.?
- DFShell
The HDFS shell is invoked by bin/hadoop dfs. All the HDFS shell commands take path URIs as arguments. The URI format is scheme://autority/path. For HDFS the scheme is hdfs, and for the local filesystem the scheme is file. The scheme and authority are optional. If not specified, the default scheme specified in the configuration is used. An HDFS file or directory such as /parent/child can be specified as hdfs://namenode:namenodeport/parent/child or simply as /parent/child (given that your configuration is set to point to namenode:namenodeport). Most of the commands in HDFS shell behave like corresponding Unix commands.?
for fs and dfs respectively, which is the cause for difference in?behavior.
[http://java.dzone.com/articles/difference-between-hadoop-dfs]
stackoverflow的解释
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 <args>
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 <args>
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 <args>
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
from: http://blog.csdn.net/pipisorry/article/details/51340838
ref:
Hadoop:hadoop fs、hadoop dfs与hdfs dfs命令的区别的更多相关文章
- 何时使用hadoop fs、hadoop dfs与hdfs dfs命令(转)
hadoop fs:使用面最广,可以操作任何文件系统. hadoop dfs与hdfs dfs:只能操作HDFS文件系统相关(包括与Local FS间的操作),前者已经Deprecated,一般使用后 ...
- 何时使用hadoop fs、hadoop dfs与hdfs dfs命令
hadoop fs:使用面最广,可以操作任何文件系统. hadoop dfs与hdfs dfs:只能操作HDFS文件系统相关(包括与Local FS间的操作),前者已经Deprecated,一般使用后 ...
- hadoop fs、hadoop dfs与hdfs dfs的区别
不多说,直接上干货! hadoop fs: 使用面最广,可以操作任何文件系统. hadoop dfs与hdfs dfs : 只能操作HDFS文件系统相关(包括与Local FS间的操作),前 ...
- Hadoop点滴-何时使用hadoop fs、hadoop dfs与hdfs dfs命令
何时使用hadoop fs.hadoop dfs与hdfs dfs命令 编辑 删除 hadoop fs:使用面最广,可以操作任何文件系统. hadoop dfs与hdfs dfs:只能操作HDFS文件 ...
- hadoop fs、hadoop dfs与hdfs dfs命令的区别
Hadoop fs:使用面最广,可以操作任何文件系统. hadoop dfs与hdfs dfs:只能操作HDFS文件系统相关(包括与Local FS间的操作),前者已经Deprecated,一般使用后 ...
- hadoop fs,hadoop dfs,hdfs dfs
hadoop fs: FS relates to a generic file system which can point to any file systems like local, HDFS ...
- Hadoop学习记录(2)|HDFS shell命令|体系结构
HDFS的shell 调用文件系统(FS)shell命令使用hadoop fs的形式 所有的FS shell命令使用URI路径作为参数. URI格式是scheme://authority/path.H ...
- hadoop 学习(三)之hdfs shell命令
1.HDFS shell 1.0查看帮助 hadoop fs -help <cmd> 1.1上传 hadoop fs -put <linux上文件> <hdfs上的路 ...
- Hadoop之hadoop fs和hdfs dfs、hdfs fs三者区别
适用范围 案例 备注 小记 hadoop fs 使用范围最广,对象:可任何对象 hadoop dfs 只HDFS文件系统相关 hdfs fs 只HDFS文件系统相关(包括与 ...
随机推荐
- [LSGDOJ1822]书架 Splay
题目描述 Sally有一个很大的书柜.这个书柜的构造有些独特,即书柜里的书是从上至下堆放成一列.她用1到n的正整数给每本书都编了号. Sally在看书的时候,每次取出一本书,看完后放回书柜然后再拿下一 ...
- NOIP 2014
Prob.1 生活大爆炸版 石头剪刀布 模拟.代码: #include<cstdio> #include<cstring> #include<iostream> u ...
- POJ 3415 不小于k的公共子串的个数
Common Substrings Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 9248 Accepted: 3071 ...
- Ubuntu 16.04 Vim安装及配置【转】
转自:http://www.cnblogs.com/ace-wu/p/6273031.html 安装VIM 默认已经安装了VIM-tiny acewu@acewu-computer:~$ locate ...
- python 中常见绘图属性
fig = plt.figure(facecolor='w')#生成图 ax = fig.add_subplot(111, projection='3d')#绘制子图 ax.scatter(t[0], ...
- java的迭代器详解
迭代器的引出 在jdk1.5版本之前是没有 foreach的,然而1.5版本就加上了foreach,而引入的新的foreach功能并不是在jvm上进行改进的因为代价太高,甲骨文工程师想到了一个比较好的 ...
- @RequestBody和@RequestParam区别
@RequestParam 用来处理Content-Type: 为 application/x-www-form-urlencoded编码的内容.(Http协议中,默认传递的参数就是applicati ...
- li标签中list-style-image如何居中
使用list-style-image设置了一个列表项的小图标时,一直不能让图标居中的显示. 解决办法是:使用ul li的backgrou-image(背景图片)来设置. 代码如下: ul li{ he ...
- 排序分析函数中对null的处理
--排序分析函数中对null的处理 --分析:对于null在分析函数中是升序默认是nulls last,降序默认是nulls first.如果不指定排序,那么是升序 )); ,'测试1'); ,'测试 ...
- Docker Kubernetes 项目
Kubernetes 是 Google 团队发起并维护的基于Docker的开源容器集群管理系统,它不仅支持常见的云平台,而且支持内部数据中心. 建于Docker之上的Kubernetes可以构建一个容 ...