栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Hive mapjoin使用

Hive mapjoin使用

方法一

set hive.auto.convert.join = true; --是否开自动mapjoin

set hive.mapjoin.smalltable.filesize;–mapjoin的表size大小

以上两个参数同时使用,在hive.auto.convert.join为true时,只要小表size小于hive.mapjoin.smalltable.filesize的设置值,并且小表不是关联操作的最后一张表,小表就会走mapjoin。

set hive.auto.convert.join = true;

set hive.mapjoin.smalltable.filesize = 6250000;

select * from table_1 --小表,size? 5m

join table_2

on 1=1;

方法二

sethive.ignore.mapjoin.hint; --true 注释方式不生效 false注释方式生效 强行指定需要加入内存走mapjoin的表

set?hive.ignore.mapjoin.hint=true;

select ?

? ? *?

from table_2

join table_1?--小表,size??5m

on 1=1;

如果mapjoin生效会在mr日志中看到以下打印日志

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/780417.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号