博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
十一:Centralized Cache Management in HDFS 集中缓存管理
阅读量:4585 次
发布时间:2019-06-09

本文共 1515 字,大约阅读时间需要 5 分钟。

    集中的HDFS缓存管理,该机制可以让用户缓存特定的hdfs路径,这些块缓存在堆外内存中。namenode指导datanode完成这个工作。

Centralized cache management in HDFS has many significant advantages.

  1. Explicit pinning prevents frequently used data from being evicted from memory. This is particularly important when the size of the working set exceeds the size of main memory, which is common for many HDFS workloads. 阻止经常使用的数据被逐出内存。
  2. Because DataNode caches are managed by the NameNode, applications can query the set of cached block locations when making task placement decisions. Co-locating a task with a cached block replica improves read performance.
  3. When block has been cached by a DataNode, clients can use a new , more-efficient, zero-copy read API. Since checksum verification of cached data is done once by the DataNode, clients can incur essentially zero overhead when using this new API.可以使用更高效的无复制的api读这些块。
  4. Centralized caching can improve overall cluster memory utilization. When relying on the OS buffer cache at each DataNode, repeated reads of a block will result in all nreplicas of the block being pulled into buffer cache. With centralized cache management, a user can explicitly pin only m of the n replicas, saving n-m memory.减少重复读时使用的
    来源: 
适用的情况:
    经常需要读的文件。比如一个小文件。
结构:
    datanode通过heartbeats定期发送缓存块信息到namenode,namdenode把新进的缓存路径发送给datanode让其缓存。
namenode会定时的复查namespace和缓存列表来决定哪些需要缓存和不需要缓存,缓存信息会更新中fsimage中和edit log中。
注意:不会缓存不一致的块,也不会缓存快捷方式的目标对象。
注意:当前只支持文件和目录级别缓存,不支持块级别。目录只支持目录下第一级的数据缓存,不支持循环。
命令和配置:
中文件参考:

转载于:https://www.cnblogs.com/skyrim/p/7455607.html

你可能感兴趣的文章
android开发环境以及genymotion虚拟机配合HBuilder测试(自总结)
查看>>
uva 10051 Tower of Cubes(DAG最长路)
查看>>
ios实例开发精品源码文章推荐
查看>>
一些技巧
查看>>
Ultra-QuickSort(数组排序问题)
查看>>
ASP.NET 超时设置
查看>>
Matlab程序 转C++/Opencv基于Mat 不可不知的17个函数
查看>>
#import和importlib的区别
查看>>
bzoj 2054: 疯狂的馒头
查看>>
SQL 公用表达式CTE
查看>>
可恶的Math.random()
查看>>
Netty线程模型
查看>>
查找->动态查找表->键树(无代码)
查看>>
关于 angular 小心得
查看>>
DDD的"waiting until GDB gets ready"
查看>>
简单解决 Javascrip 浮点数计算的 Bug(.toFixed(int 小数位数))
查看>>
laravel错误1071 Specified key was too long; max key length is 1000 bytes
查看>>
正则表达式,的简单应用
查看>>
iOS开发~CocoaPods使用详细说明
查看>>
如何解决浏览器兼容问题
查看>>