我使用以下 hive-site.xml 属性配置了 Hive 并行性并重新启动了集群
物业 1
Name: hive.exec.parallel
Value: true
Description: Run hive jobs in parallel
属性 2
Name: hive.exec.parallel.thread.number
Value: 8 (default)
Description: Maximum number of hive jobs to run in parallel
为了测试并行性,我创建了以下 2 个条件:
1 . file.hql 中的单个查询并将其运行为hive -f file.hql
SELECT COL1, COL2 FROM TABLE1
UNION ALL
SELECT COL3, COL4 FROM TABLE2
结果:
当 hive.exec.parallel = true 时,所用时间:28.015 秒,总 MapReduce CPU 时间:3 秒 10 毫秒
当 hive.exec.parallel = false 时,耗时:24.778 秒,总 MapReduce CPU 耗时:3 秒 90 毫秒。
2 . 如下2个不同文件中的独立查询并将其运行为nohup hive -f file1.hql & nohup hive -f file2.hql
select count(1) from t1 -> file1.sql
select count(1) from t2 -> file2.sql
结果:
当 hive.exec.parallel = false 时,耗时:29.391 秒,总 MapReduce CPU 耗时:1 秒 890 毫秒
问题:
如何检查上述 2 个条件是否确实并行运行?在控制台中,我看到的结果好像查询是按顺序运行的。
为什么 hive.exec.parallel = true 花费的时间更多?我怎样才能看到使用了 hive 多个阶段?
谢谢,