配置单元聚合查询从缓存中获取错误的值 [英] hive aggregate query takes wrong value from cache

查看:84
本文介绍了配置单元聚合查询从缓存中获取错误的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在配置单元会话上运行聚合查询.

hive>从表名称中选择count(1);

它第一次运行mapreduce程序并返回结果.但是对于当天晚些时候的连续运行,它会从缓存中返回相同的计数(尽管表每小时更新一次).这是错误的计数.

尝试:-

设置hive.metastore.aggregate.stats.cache.enabled = false

hive.cache.expr.evaluation = false

设置hive.fetch.task.conversion = none

但是没有运气.使用 Hive 1.2.1.2.3.4.29-5 配置单元版本.谢谢

解决方案

禁止使用统计信息进行查询计算:

 设置hive.compute.query.using.stats = false; 

另请参阅此答案以获取更多详细信息: https://stackoverflow.com/a/41021682/2700344

I am running aggregate query on hive session.

hive>select count(1) from table_name;

For the first time it runs mapreduce program and returns result. But for the consecutive runs later in the day it returns same count from the cache(though table is getting updated hourly). which is wrong count.

tried:-

set hive.metastore.aggregate.stats.cache.enabled=false

hive.cache.expr.evaluation=false

set hive.fetch.task.conversion=none

But no luck. Using Hive 1.2.1.2.3.4.29-5 hive version. Thanks

解决方案

Disable using stats for query calculation:

set hive.compute.query.using.stats=false;

See also this answer for more details: https://stackoverflow.com/a/41021682/2700344

这篇关于配置单元聚合查询从缓存中获取错误的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆