Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize Multi-output expansion by hadoop streaming

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces hadoop streaming how to achieve multi-output expansion, the article introduces in great detail, has a certain reference value, interested friends must read it!

There are two function points implemented by PrefixMultipleOutputFormat

Enter to a different directory according to the prefix of key

Delete the tab in the final output

# # usage # output to different directories according to the prefix of key

$maserati_hadoop jar $HADOOP_HOME/share/hadoop/tools/lib/hadoop-streaming-2.6.0.jar-libjars. / adts.jar-D mapred.job.name=$name\-D mapred.reduce.tasks=5\-inputformat org.apache.hadoop.mapred.TextInputFormat\-outputformat com.sogou.adt.adts.PrefixMultipleOutputFormat\-input $input\-output $output\-mapper. / m_mapper.sh\-reducer. / M_reducer.sh\-file m_mapper.sh\-file m_reducer.sh

Where outputformat specifies the class of its own time-libjars. / adts.jar imports its own jar package

# mapper and reduer.sh # # m_maper.sh## #! / bin/bash awk-F "'{for

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report