hadoop,Hadoop排序实例

排序实例

排序实例仅仅用 map/reduce框架来把输入目录排序放到输出目录。输入和输出必须是顺序文件,键和值是BytesWritable.
mapper是预先定义的IdentityMapper,reducer 是预先定义的 IdentityReducer, 两个都是把输入直接的输出。
要运行这个例 子:bin/hadoop jar hadoop-*-examples.jar sort [-m <#maps>] [-r <#reduces>]

运行排序基准测试

为了使得排序例子作为一个 基准测试,用 RandomWriter产 生10GB/node 的数据。然后用排序实例来进行排序。这个提供了一个可扩展性依赖于集群的大小的排序基准。默认情况下,排序实例用1.0*capacity作为 reduces的数量,依赖于你的集群的大小你可能会在1.75*capacity的情况下得到更好的结果。
To use the sort example as a benchmark, generate 10GB/node of random data using RandomWriter. Then sort the data using the sort example. This provides a sort benchmark that scales depending _disibledevent=>DevelopmentCommandLineOptions
http://www.hadooper.cn/dct/page/65777
Tags:  hadoop

延伸阅读

最新评论

发表评论