HDFS Short-Circuit Local Reads
来源:互联网 发布:2016年coc双王数据 编辑:程序博客网 时间:2024/06/05 17:23
HDFS中,读操作通常通过DataNode。因此,当一个客户端访问DataNode读一个文件的时候,DataNode从磁盘中读出该文件,然后通过TCK Socket发送到客户端。所谓的“short-circuit”是绕开DataNode,允许客户端直接读一个文件。明显地,当客户端与数据在同一地点时可能会出现这种情况。Short-circuit为很多应用提供了巨大的性能提升。
Configuration
为了配置short-circuit本地读,你将需要启用libhadoop.so。查看Native Libraries部分获取更多开启本地库的细节。
Short-circuit读利用了Unix的域套接字。这在文件系统中是一个特别的路径,这允许客户端和DataNode来通信。你将需要设置这个路径到这个Socket中。DataNode需要能够创建这个路径。另一方面,这个路径应该不可能被除了hdfs和root用户之外的任何用户创建。因为这个原因,经常使用中/var/run or /var/lib的子目录的路径。
Short-circuit本地读需要在DataNode和客户端都配置。
Example Configuration
这是一个配置的例子:
Configuration Keys
1. dfs.client.read.shortcircuit
这个配置参数打开short-circuit本地读
2. dfs.client.read.shortcircuit.skip.checksum
如果这个配置参数被设置,short-circuit本地读将会跳过checksum。这通常不推荐,但是对于一些特别的安装可能会有用。你可能需要在HDFS外做你自己的checksum。
3. dfs.client.read.shortcircuit.streams.cache.size
DFSClient维护了一个最近打开文件的描述符的缓存。这个参数管理缓存的大小。设置高了将会使用更多的文件描述符,但是潜在地在查询发在方面提供更好的性能。
4. dfs.client.read.shortcircuit.streams.cache.expiry.ms
这个参数控制文件描述符在文件因为inactive太长时间可以被关闭之前需要被放进FileInputStreamCache 的最小时间。
5. dfs.client.domain.socket.data.traffic
这控制我们是否将尝试通过Unix域套接字传送正常的数据流量。
How Improved Short-Circuit Local Reads Bring Better Performance and Security to Hadoop
http://blog.cloudera.com/blog/2013/08/how-improved-short-circuit-local-reads-bring-better-performance-and-security-to-hadoop/
- HDFS Short-Circuit Local Reads
- HDFS Short-Circuit Local Reads
- HDFS Short-Circuit Local Reads
- 详解HDFS Short Circuit Local Reads
- 详解HDFS Short Circuit Local Reads
- How Improved Short-Circuit Local Reads Bring Better Performance and Security to Hadoop
- webwork中的short-circuit问题
- 短路求值(Short-circuit evaluation)
- Struts2框架验证--短路较验(short-circuit)
- Altium Designer 16 导线、焊盘报错 Clearance Constraint、Short-Circuit
- ERROR [ValidatorFileParser] Attribute "short-circuit" must be declared forelement type "field-validator".
- Linux c编程一站式学习笔记(07), Side Effect,Short-circuit与SequencePoint小结
- [FindBugs分析记录]Potentially dangerous use of non-short-circuit logic
- matlab2014a中help与参考页翻译 Logical Operators: Short-Circuit && ||
- hive 查询结果导入 local 与 HDFS
- hdfs - ls: Failed on local exception: com.google.protobuf.InvalidProtocolBufferException:
- RC circuit
- Circuit Board
- HDFS集中式的缓存管理原理与代码剖析
- PART VII 通信层 Chapter 15 网络
- 封锁阳光大学_洛谷1330_bfs
- PART VII 通信层 Chapter 16 万维网
- hdu 1251 统计难题(字典树)
- HDFS Short-Circuit Local Reads
- docker
- POJ 2488 A Knight's Journey【DFS + 回溯】
- 水仙花数的PE!!!
- 236. Lowest Common Ancestor of a Binary Tree最长公共祖先
- 【a502】符号三角形问题
- (转)adb操作命令详解及大全
- uboot-cmd按键退出
- Ansible最佳实践