2014年6月11日 星期三

[elasticsearch]elasticsearch-hadoop using mapreduce with elasticsearch 之二 情境


之前已經寫過一篇關於在 Hadoop 下 使用 Elasticsearch 的 elasticsearch-hadoop lib 的說明。

這裡在重述幾件事情,
Hadoop MapReduce Job 通常下列的典型流程。


1. Job config : input, output, input format, output format , etc
2. Mapper 處理每個 從 HDFS 讀入的 line 並且 輸出 key value pair  到 Reducer。 
3. In reducer 會匯集所有相同key 值的 value 並得到最終結果並寫回HDFS。
elasticsearch-hadoop lib 就是在從事這樣的操作。

有幾個常見的 scenarios。

1. 從 Elasticsearch 讀取(query)資料
- 使用Mapreduce job來處理資料
- 把 output結果存到 HDFS (或是再次把output 存入ElasticSearch / ESindexing operation)

2. 使用 MapReduce 對原先存放在 HDFS的資料做操作。
- 處理資料
- 把結果輸出到 Elasticsearch (即是 Elasticsearch 的 索引過程)


More Link
peicheng note: [elasticsearch]elasticsearch-hadoop using mapreduce with elasticsearch
http://peichengnote.blogspot.tw/2014/06/elasticsearchelasticsearch-hadoop-using.html
peicheng note: elasticsearch 相關 elasticsearch文章
http://peichengnote.blogspot.tw/search/label/elasticsearch

沒有留言:

張貼留言