我是使用Hadoop的初学者。查看Apache Hadoop的文档,我发现数据主要可以按数字或字母顺序排序。这里是API文档的链接:
https://hadoop.apache.org/docs/r1.2.1/api/org/apache/hadoop/mapred/lib/KeyFieldBasedComparator.html
我能以任何方式按时间顺序合并数据吗?
答案 0 :(得分:0)
默认情况下,如果要根据任何其他条件对数据进行排序,则按字典顺序对数据进行排序,然后需要实现二级排序
请按照以下链接
http://www.bigdataspeak.com/2013/02/hadoop-how-to-do-secondary-sort-on_25.html