MR排關於分區和排序筆記

MR 分區:    1.在MR中partitioner將Mapper產生的中間結果進行分區,然後將同一組數據提交給一個Reducer中處理    2.partitioner默認調用的是Hashpartitioner,用它來把數據分組然後發送給不同的reducer    3.計算公式:(key.hashCode() & Integer.MAX_VALUE) % numReduceTasks 實現分區
相關文章
相關標籤/搜索