我在impala中有一个关于数据局部性的问题,假设我有10个数据节点的集群(在每个数据节点上有impalad),如果我在impala SELECT * FROM big_table where dt='2017' where blabla orderby blabla group by blabla中执行查询(假设这是一个大查询)。
假设分区(dt=2017')下的文件在dn 1,3,5中,那么如果我要执行查询,协调器是只使用守护进程1,3,5进行数据定位,还是使用所有的守护进程,而其他守护进程将远程读取此数据?
发布于 2017-03-12 12:19:22
对你的问题的简单回答:它只使用守护进程1,3,5作为数据局部性。
这通常是一个调度问题。Impala在simple-scheduler.cc中做出这样的决定。
// We schedule greedily in this order:
// cached collocated replicas > collocated replicas > remote (cached or not) replicas.如果有一个后端位于同一位置,Impala将不会使用其他后端来扫描datanode。对于没有扫描节点的片段,如分区聚合节点,impala将它们放在与其输入片段所在的位置相同的位置。
// there is no leftmost scan; we assign the same hosts as those of our
// leftmost input fragment (so that a partitioned aggregation fragment
// runs on the hosts that provide the input data)https://stackoverflow.com/questions/42144834
复制相似问题