MaximumAverageReducer.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:Hadoop-Codes 作者:
public void reduce(Text key, Iterable<FloatWritable> values, Context context)
        throws IOException, InterruptedException {

    float max=0;
    for (FloatWritable val : values) {
        if(val.get()>max){
            max=val.get();
        }

    }
    context.write(key, new FloatWritable(max));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号