0
我必須實現兩個mapReduce作業,其中階段II(Mapper_2)中的映射器需要在階段I(reducer_1)中具有Reducer的輸出。Mapper with multipleInput on Hadoop cluster
Mapper_2還需要另一個大文本文件(2TB)的輸入。
我寫了如下,但我的問題是:文本輸入將分散在羣集中的節點,但減速器_1的輸出如何,因爲我希望在階段II中的每個映射器具有整個Reducer_1的輸出。
MultipleInputs.addInputPath(Job, TextInputPath, SomeInputFormat.class, Mapper_2.class);
MultipleInputs.addInputPath(Job, Ruducer_1OutputPath, SomeInputFormat.class, Mapper_2.class);
謝謝您的回答,我怎麼能在distributedCache訪問數據運行一次當我寫Mapper_2代碼? – SNSI