hive,order by ,distribute by ,sort by ,cluster by 區別,作用,用法

0 order by 是全局有序。sort by是在一個reduce中排序,該reduce的輸出有序,是局部有序。distriute by c1 是作用於map輸出的結果,把c1的值相同的記錄輸入到同一個reduce中;如果reduce數目比較少,c1多個不同值的記錄會輸入到同一個reduce中。 1 distribute by要寫在sort by前面,不然報錯 2 distribute by c
相關文章
相關標籤/搜索