请说明 hive 中 Sort By,Order By,Cluster By,Distrbute By 各代表什么意思

Posted 闭关苦炼内功

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了请说明 hive 中 Sort By,Order By,Cluster By,Distrbute By 各代表什么意思相关的知识,希望对你有一定的参考价值。

Order by:

会对输入做全局排序,因此只有一个 reducer(多个 reducer 无法保证全局有序)。只有一个reducer,会导致当输入规模较大时,需要较长的计算时间。

Sort by:

不是全局排序,其在数据进入 reducer 前完成排序。

Distribute by:

按照指定的字段对数据进行划分输出到不同的reduce 中。

Cluster by:

除了具有 distribute by 的功能外还兼具 sort by 的功能

以上是关于请说明 hive 中 Sort By,Order By,Cluster By,Distrbute By 各代表什么意思的主要内容,如果未能解决你的问题,请参考以下文章

Hive中order by,sort by,distribute by,cluster by的区别

Hive中sort by,order by,cluster by,distribute by总结

hive order by sort by distribute by和sort by一起使用 cluster by

hive中order by,sort by, distribute by, cluster by的用法

hive中order by,sort by, distribute by, cluster by作用以及用法

Hive之cluster by , distribute by,order by,sort by