HDFS centralized cache management

来源:互联网 发布:python wi fi破解 编辑:程序博客网 时间:2024/06/07 17:40


Hadoop 2.3.0解决了如下几个问题:

  1. 可以指定自己的热点数据常存内存;
  2.  NameNode  manage centralized cache;
  3.   without DataNode OS buffer cache to saving resoureces;
  4. speed up HDFS client read .when the block cache in memory ,directly using zero-copy read from cache pass thougth hard  I/O、checksum.
下面内容是参考

cache directive: 表示要被cache到内存的文件或者目录。 
cache pool: 用于管理一系列的cache directive,类似于命名空间

具体操作:

[root@HDP01 ~]# [root@HDP01 ~]# hdfs cacheadmin -addPool financialAccessControlException: Access denied for user root. Superuser privilege is required[root@HDP01 ~]# [root@HDP01 ~]# su hdfdssu: user hdfds does not exist[root@HDP01 ~]# su hdfs[hdfs@HDP01 root]$ hdfs cacheadmin -addPool financialSuccessfully added cache pool financial.[hdfs@HDP01 root]$ exitexit[root@HDP01 ~]# hdfs cacheadmin -addDirective -path /test/install.log -pool financial -replication 1AccessControlException: Permission denied while accessing pool financial: user root does not have WRITE permissions.[root@HDP01 ~]# [root@HDP01 ~]# su hdfs[hdfs@HDP01 root]$ hdfs cacheadmin -addDirective -path /test/install.log -pool financial -replication 1Added cache directive 1[hdfs@HDP01 root]$ [hdfs@HDP01 root]$ hdfs cacheadmin -listPoolsFound 1 result.NAME       OWNER  GROUP   MODE            LIMIT  MAXTTLfinancial  hdfs   hadoop  rwxr-xr-x   unlimited   never[hdfs@HDP01 root]$ [hdfs@HDP01 root]$ hdfs cacheadmin -listPoolsFound 1 result.NAME       OWNER  GROUP   MODE            LIMIT  MAXTTLfinancial  hdfs   hadoop  rwxr-xr-x   unlimited   never[hdfs@HDP01 root]$ [hdfs@HDP01 root]$ hdfs cacheadmin -listDirectivesFound 1 entry ID POOL        REPL EXPIRY  PATH                1 financial      1 never   /test/install.log [hdfs@HDP01 root]$



centralized cachedistributed cache的区别:

  1. distributed cache:disk locality
  2. centralized cache:memory locality


0 0
原创粉丝点击