当前位置:网站首页>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
边栏推荐
- How to realize the center progress bar in wechat applet
- 吴恩达的机器学习适合入门吗?
- VIM common shortcut keys
- 谈谈数字化转型的几个关键问题
- ML&DL:機器學習和深度學習中超參數優化的簡介、評估指標、過擬合現象、常用的調參優化方法之詳細攻略
- How to judge whether the JS object is empty
- Summary of interesting websites
- Is machine learning suitable for girls?
- 机器学习适合女生学吗?
- Why does the computer speed slow down after vscode is used for a long time?
猜你喜欢

Nansen复盘加密巨头自救:如何阻止百亿多米诺倾塌

How to use data sets in machine learning?

程序员女友给我做了一个疲劳驾驶检测

盘点华为云GaussDB(for Redis)六大秒级能力

win11更新后任务栏空白怎么办? win11更新后任务栏空白卡死的解决方法
![Flip the linked list ii[three ways to flip the linked list +dummyhead/ head insertion / tail insertion]](/img/a8/6472e2051a295f5e42a88d64199517.png)
Flip the linked list ii[three ways to flip the linked list +dummyhead/ head insertion / tail insertion]

Niubi | the tools I have treasured for many years have made me free to fish with pay

Open the jupyter notebook/lab and FAQ & settings on the remote server with the local browser

Usbcan analyzer's supporting can and canfd comprehensive test software lkmaster software solves engineers' can bus test problems

PyTorch量化实践(2)
随机推荐
Introduction to go web programming: a probe into the excellent test library gocovey
B_ QuRT_ User_ Guide(31)
Deployment and use of Nacos
Do machine learning jobs require graduate students?
1-13 express listens to get and post requests & processes requests
Mysql:sql overview and database system introduction | dark horse programmer
1-1 basic concepts of database
Uniapp rich text editor
Zhoushaojian, rare
Open the jupyter notebook/lab and FAQ & settings on the remote server with the local browser
1-14 express托管静态资源
WinDbg debugging tool introduction
Pytorch quantitative practice (1)
Online education program user login and registration
Some problems when SSH default port is not 22
Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
Qsort function and Simulation Implementation of qsort function
Best wishes for Lao Wu's party
交易所系统开发如何开发?数字货币交易所系统开发成熟技术案例
腾讯3年,功能测试进阶自动化测试,送给在手工测试中迷茫的你