当前位置:网站首页>HDFS centralized cache management
HDFS centralized cache management
2022-06-30 22:08:00 【Brother Xing plays with the clouds】
Hadoop from 2.3.0 Version starting support HDFS Caching mechanisms ,HDFS Allows users to cache some directories or files in HDFS among ,NameNode Will notify the DataNodes Cache it in DataNode In the memory of
Centralized caching Management has many significant advantages :
- Prevent frequently used data from being cleared from memory
- because DataNode The cache of is provided by NameNode To manage ,applications You can query the cached list when scheduling tasks , Using a cached block copy can improve read performance
- When the block is DataNode After caching , The client can use a new 、 efficient 、zero-copy The reading of API, Because the data in the cache has been calculated checksum, When using new API when , The client is basically zero overhead
- Can improve colony Memory utilization of . When using the operating system cache , Repeated reading of a block will cause all copies to be put into the buffer , When using Centralized caching when , Users can specify n One copy of m Will be cached , You can save n-m Of memory
usage
Centralized caching It is very useful for frequently accessed files , for example hive Often used in fact Tables are ideal for caching ; On the other hand , Caching query results for a year may not be so useful , Because this result may only be viewed once
It also helps to improve the efficiency of mixed type operations SLA performance , Caching high priority data ensures that it does not compete with low priority data IO
Use :
[[email protected] hadoop]$ hdfs cacheadmin -addPool admin 【 Add one pool】
Successfully added cache pool admin.
[[email protected] hadoop]$ hdfs cacheadmin -listPools 【 see pool list 】
Found 1 result.
NAME OWNER GROUP MODE LIMIT MAXTTL
admin hadoop hadoop rwxr-xr-x unlimited never
[[email protected] hadoop]$ hdfs cacheadmin -addDirective -path /input -pool admin 【 Add a directory to pool】
Added cache directive 1
[[email protected] hadoop]$ hdfs cacheadmin -listDirectives 【 View cached data 】
Found 2 entries
ID POOL REPL EXPIRY PATH
1 admin 1 never /input
2 test 1 never /output/0
[[email protected] hadoop]$ hdfs cacheadmin -removeDirective 1 【 Press id Clear cache 】
Removed cached directive 1
[[email protected] hadoop]$ hdfs cacheadmin -listDirectives
Found 1 entry
ID POOL REPL EXPIRY PATH
2 test 1 never /output/0
[[email protected] hadoop]$ hdfs cacheadmin -removeDirectives -path /output/0 【 Press path Clear cache 】
Removed cache directive 2
Removed every cache directive with path /output/0
[[email protected] hadoop]$ hdfs cacheadmin -listDirectives
Found 0 entries
边栏推荐
- 机器学习工作要求研究生吗?
- 京东与腾讯续签三年战略合作协议;起薪涨至26万元,韩国三星SK争相加薪留住半导体人才;Firefox 102 发布|极客头条
- 1-13 express listens to get and post requests & processes requests
- Is Wu Enda's machine learning suitable for entry?
- The programmer's girlfriend gave me a fatigue driving test
- 1. Summary of wechat applet page Jump methods; 2. the navigateto stack does not jump to the tenth floor
- How to upload binary pictures in uniapp
- 吴恩达的机器学习适合入门吗?
- Neurotransmetteurs excitateurs - glutamate et santé cérébrale
- Error filesystemexception: /data/nodes/0/indices/gttxk-hntgkhacm-8n60jw/1/index/ es_ temp_ File: structure needs cleaning
猜你喜欢

Jupyterbook clear console output

吴恩达的机器学习适合入门吗?

On several key issues of digital transformation

机器学习中如何使用数据集?

从PG15 XID64再次跳票说起

牛逼|珍藏多年的工具让我实现了带薪摸鱼自由

【MySQL入门】第一话 · 初入“数据库”大陆

Is it difficult to get a certified equipment supervisor? What is the relationship with the supervising engineer?

WinDbg debugging tool introduction

Excitatory neurotransmitter glutamate and brain health
随机推荐
艾芬医生事件解析
阿婆做的臭豆腐
Rethink healthy diet based on intestinal microbiome
Microservice link risk analysis
Uniapp rich text editor
微服务链路风险分析
Flip the linked list ii[three ways to flip the linked list +dummyhead/ head insertion / tail insertion]
How to use data sets in machine learning?
机器学习中如何使用数据集?
Akk bacteria - the next generation of beneficial bacteria
B_ QuRT_ User_ Guide(34)
1-7 Path路径模块
Jupyter notebook/lab switch CONDA environment
1-2 安装并配置MySQL相关的软件
A comprehensive understanding of gout: symptoms, risk factors, pathogenesis and management
5G 在智慧医疗中的需求
【BSP视频教程】BSP视频教程第19期:单片机BootLoader的AES加密实战,含上位机和下位机代码全开源(2022-06-26)
Look at the top 10 capabilities of alicloud cipu
JD and Tencent renewed the three-year strategic cooperation agreement; The starting salary rose to 260000 yuan, and Samsung sk of South Korea scrambled for a raise to retain semiconductor talents; Fir
1-21 JSONP接口