gpt4 book ai didi

hadoop - Hadoop排序图并减少键值

转载 作者:行者123 更新时间:2023-12-02 20:14:08 24 4
gpt4 key购买 nike

如果我在每行上都有一个随机整数的文件,并且想使用Hadoop对文件进行排序,那么我的映射器和化简器的输入/输出键和值将是什么?

最佳答案

雅虎有sorted Peta和Tera Bytes数据。其他(包括Google)会定期执行此操作,您可以在Internet上搜索排序基准。雅虎发布了有关他们如何完成的paper

“org.apache.hadoop.examples.terasort”软件包具有用于对数据进行排序的示例代码。

在Cloudera博客here中找到了更多信息。有一些内置的类使排序更容易。

Total order partitions HADOOP-3019. As a spin-off from the TeraSort record, Hadoop now has library classes for efficiently producing a globally sorted output. InputSampler is used to sample a subset of the input data, and then TotalOrderPartitioner is used to partition the map outputs into approximately equal-sized partitions. Very neat stuff — well worth a look, even if you don’t need to use it.



您还可以找到更多信息 here

关于hadoop - Hadoop排序图并减少键值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7670307/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com