私はHadoopのmapreduceを実装しています。マッパー関数の複数出力Hadoopのバージョンの問題
:マップへの私の入力は、以下のようなテーブルであります得意先、IP、Attrの、日付
customer1、IP1、ATTR1、日付1
customer2、IP2、ATTR1、date2の
マッパーからの出力があるべき複数のファイル
ファイル1:IP-M-00000
キー、値
customer1_IP1、DATE1
customer2_IP2、DATE2
ファイル2:たAttr-M-00000
キー、値
customer1_attr1、 date1
customer2_attr1、date2の
私はHadoopの2.2.0がインストールされていると私は私のtxtKeyがcustomerid_ $属性で次のコード
MultipleOutputs.addMultiNamedOutput (job, "IP", TextOutputFormat.class, Text.class, Text.class); // in the Driver.class
MultipleOutputs.getCollector("IP", context).collect(txtKey, txtValue); // in the Mapper.class
を使用しています、txtValueは日付です。
私は2.8.0を別のパーソナルマシンにインストールしており、MultipleOutputsオブジェクトは実装が非常に簡単な書き込み機能を持っています。 hadoop-2.8.0にあるMultipleOutputs.write()は、hadoop-2.2.0では実装されていません。
MultipleOutputs.write()機能を持たないhadoop-2.2.0でmultipleOutputファイルを書く方法に関するアイデアはありますか?
この質問に修正が必要な場合は、ご質問ください。
おかげで、
グル