集中的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中。
注意:不会缓存不一致的块,也不会缓存快捷方式的目标对象。
注意:当前只支持文件和目录级别缓存,不支持块级别。目录只支持目录下第一级的数据缓存,不支持循环。


命令和配置:

中文件参考:





十一:Centralized Cache Management in HDFS 集中缓存管理的更多相关文章

  1. Centralized Cache Management in HDFS

    Overview(概述) Centralized cache management in HDFS is an explicit caching mechanism that allows users ...

  2. HDFS集中式缓存管理(Centralized Cache Management)

    Hadoop从2.3.0版本号開始支持HDFS缓存机制,HDFS同意用户将一部分文件夹或文件缓存在HDFS其中.NameNode会通知拥有相应块的DataNodes将其缓存在DataNode的内存其中 ...

  3. HDFS中的集中缓存管理详解

    一.背景 Hadoop设计之初借鉴GFS/MapReduce的思想:移动计算的成本远小于移动数据的成本.所以调度通常会尽可能将计算移动到拥有数据的节点上,在作业执行过程中,从HDFS角度看,计算和数据 ...

  4. HDFS集中式的缓存管理原理与代码剖析--转载

    原文地址:http://yanbohappy.sinaapp.com/?p=468 Hadoop 2.3.0已经发布了,其中最大的亮点就是集中式的缓存管理(HDFS centralized cache ...

  5. HDFS集中式的缓存管理原理与代码剖析

    转载自:http://www.infoq.com/cn/articles/hdfs-centralized-cache/ HDFS集中式的缓存管理原理与代码剖析 Hadoop 2.3.0已经发布了,其 ...

  6. 自定义缓存管理器 或者 Spring -- cache

    Spring Cache 缓存是实际工作中非常常用的一种提高性能的方法, 我们会在许多场景下来使用缓存. 本文通过一个简单的例子进行展开,通过对比我们原来的自定义缓存和 spring 的基于注释的 c ...

  7. 【Hadoop学习】HDFS中的集中化缓存管理

    Hadoop版本:2.6.0 本文系从官方文档翻译而来,转载请尊重译者的工作,注明以下链接: http://www.cnblogs.com/zhangningbo/p/4146398.html 概述 ...

  8. HDFS集中化缓存管理

    概述 HDFS中的集中化缓存管理是一个明确的缓存机制,它允许用户指定要缓存的HDFS路径.NameNode会和保存着所需快数据的所有DataNode通信,并指导他们把块数据缓存在off-heap缓存中 ...

  9. Webview离线功能(优先cache缓存+cache缓存管理)

    在做Webview显示服务器的html功能时 需要加入离线功能. 开始思路很狭隘,以为一定应该是从服务器得到的html文件,下载到本地后加载~ 但是这样不能离线查看图片,因为图片数据并不再html中, ...

随机推荐

  1. es6 数组扩展方法

    1.扩展运算符 含义: 扩展运算符,三个点(...),将一个数组转为用逗号分隔的参数顺序. 例如: console.log([1,2,3]); console.log(...[1,2,3]);   结 ...

  2. android软件开发之获取本地音乐属性

    歌曲的名称 :MediaStore.Audio.Media.TITLString tilte = cursor.getString(cursor.getColumnIndexOrThrow(Media ...

  3. 利用clear清除浮动的一些问题

    下面这段代码是用来清除浮动带来的高度塌陷问题 .clearfix:before { content: "."; display: block; height: 0; clear: ...

  4. 虚拟机下linux 系统网卡配置、固定IP地址

    1.进入该目录下修改内容 vi       /etc/sysconfig/network-scripts/  ifcfg-eth0 TYPE=Ethernet BOOTPROTO=static DEF ...

  5. 分析nginx 日志常用命令

    一.概念 并发连接数    客户端向服务器发起请求,并建立了TCP连接.每秒钟服务器链接的总TCP数量,就是并发连接数.请求数    请求数指的是客户端在建立完连接后,向http服务发出GET/POS ...

  6. ruby中的extend 和 include

    include include是把module中定义的instance_method给mixin,然后当做类的实例方法使用(是因为module本身不能使用module的实例方法),给类进行实例化一个对 ...

  7. arping命令用法

    arping命令使用说明 BusyBox v1.17.3 (2011-07-20 17:01:30 CST) multi-call binary. Usage: arping [-fqbDUA] [- ...

  8. Go搭建一个博客系统

    go语言环境就不用多说了,版本肯定越高越好,这里用go1.10 先放着

  9. linux进程篇 (二) 进程的基本控制

    2. 进程的基本操作 接口函数 #include <unistd.h> //创建子进程 pid_t fork(void); //结束子进程 void exit(int status); / ...

  10. C语言实现左旋字符串

    #include<stdio.h> #include<stdlib.h> #include<string.h> void left_rotate(char *str ...