当前位置:网站首页>解决小文件处过多
解决小文件处过多
2022-07-06 09:01:00 【棱镜7】
1. 使用hive自带的concatenate命令,自动合并小文件
使用方法:
2. 调整参数减少map数量
在执行map前进行小文件合并,在 mapper 中将多个文件合成一个 split 作为输入。调整split 的至少大小
3. 减少Reduce的数量
reduce 的个数决定了输出的文件的个数,所以可以调整 reduce 的个数控制 hive表的文件数量。
4. HAR归档
使用hadoop的archive将小文件归档,能够将多个小文件打包成一个har文件
5. jvm重用
Hadoop的默认配置通常是使用派生JVM来执行map和Reduce任务的。这时JVM的启动过程可能会造成相当大的开销,尤其是执行的job包含有成百上千task任务的情况。JVM重用可以使得JVM实例在同一个job中重新使用N次。
这个功能的缺点是,开启JVM重用将一直占用使用到的task插槽,以便进行重用,直到任务完成后才能释放。
边栏推荐
- Redis分布式锁实现Redisson 15问
- Redis之哨兵模式
- Heap (priority queue) topic
- CSP student queue
- go-redis之初始化连接
- LeetCode41——First Missing Positive——hashing in place & swap
- AcWing 2456. 记事本
- Intel distiller Toolkit - Quantitative implementation 3
- Blue Bridge Cup_ Single chip microcomputer_ PWM output
- Booking of tourism products in Gansu quadrupled: "green horse" became popular, and one room of B & B around Gansu museum was hard to find
猜你喜欢
Chapter 1 :Application of Artificial intelligence in Drug Design:Opportunity and Challenges
Mise en œuvre de la quantification post - formation du bminf
基于B/S的医院管理住院系统的研究与实现(附:源码 论文 sql文件)
LeetCode41——First Missing Positive——hashing in place & swap
英雄联盟轮播图手动轮播
SimCLR:NLP中的对比学习
Kratos ares microservice framework (II)
基于B/S的影视创作论坛的设计与实现(附:源码 论文 sql文件 项目部署教程)
Parameterization of postman
Full stack development of quartz distributed timed task scheduling cluster
随机推荐
Redis cluster
Intel distiller Toolkit - Quantitative implementation 2
Le modèle sentinelle de redis
为拿 Offer,“闭关修炼,相信努力必成大器
IDS cache preheating, avalanche, penetration
CSP student queue
Solve the problem of inconsistency between database field name and entity class attribute name (resultmap result set mapping)
The order of include header files and the difference between double quotation marks "and angle brackets < >
CUDA realizes focal_ loss
基于B/S的影视创作论坛的设计与实现(附:源码 论文 sql文件 项目部署教程)
Parameterization of postman
Appears when importing MySQL
Kratos战神微服务框架(三)
什么是MySQL?MySql的学习之路是怎样的
Kratos ares microservice framework (II)
Global and Chinese market of appointment reminder software 2022-2028: Research Report on technology, participants, trends, market size and share
The five basic data structures of redis are in-depth and application scenarios
Detailed explanation of cookies and sessions
Lua script of redis
I-BERT