我從我的映射輸出中:的MapReduce,排序的值
Mapper: KEY, VALUE(Timestamp, someOtherAttrbibutes)
我減速確實收到:
Reducer: KEY, Iterable<VALUE(Timestamp, someOtherAttrbibutes)>
我想Iterable<VALUE(Timestamp, someOtherAttrbibutes)>
由時間戳下令屬性。有沒有可能實施它?
我想避免手動排序Reducer代碼。 http://cornercases.wordpress.com/2011/08/18/hadoop-object-reuse-pitfall-all-my-reducer-values-are-the-same/
我將不得不從「Iterable」「深度複製」所有對象,這可能會導致巨大的內存開銷。 :(((
我讀過這篇文章的,漂亮的同樣是在Hadoop中所描述的,defenitive指南3.我的理解,我必須移動我的T imestamp屬性鍵和鍵組合:[EXISTING_KEY_VALUE,Timestamp_attr_from_value]。如果是的話,我不喜歡這種方法。對我來說,這對我的業務並不自然,可以混淆其他開發者...... :( – Sergey
+1 - 這是最好的方法,對不起! –
好的,我會做的。謝謝... – Sergey