【Elasticsearch】stream2es

1970 단어
하나,
[root@hfelkcld0001 elasticsearch]# pwd
/usr/share/elasticsearch

[root@hfelkcld0001 elasticsearch]# curl -O download.elasticsearch.org/stream2es/stream2es; chmod 777 stream2es

[root@hfelkcld0001 elasticsearch]# chown elasticsearch:elasticsearch stream2es

[root@hfelkcld0001 elasticsearch]# ll
total 28764
drwxr-xr-x 2 elasticsearch elasticsearch     4096 Apr  7 01:39 bin
drwxr-xr-x 2 elasticsearch elasticsearch     4096 Apr  7 01:39 lib
-rw-r--r-- 1 elasticsearch elasticsearch    11358 Jan 27 12:53 LICENSE.txt
drwxr-xr-x 5 elasticsearch elasticsearch     4096 Apr  7 01:39 modules
-rw-r--r-- 1 elasticsearch elasticsearch      150 Jan 27 12:53 NOTICE.txt
drwxr-xr-x 3 elasticsearch elasticsearch     4096 Apr 11 06:14 plugins
-rw-r--r-- 1 elasticsearch elasticsearch     8700 Jan 27 12:53 README.textile
-rwxrwxrwx 1 elasticsearch elasticsearch 29408864 Apr 29 02:01 stream2es

2. stream2es for elasticsearch
http://blog.florian-hopf.de/2013/11/reindexing-content-in-elasticsearch_27.html
3. stream2es for twitter
https://github.com/elastic/stream2es
step1:
트위터 스트리밍을 사용하려면 트위터 앱을 먼저 만들어야 합니다(https://dev.twitter.com/apps/new ).consumer key 및consumer secret 가져오기
step2:
앱 확인
[root@hfelkcld0001 elasticsearch]# pwd
/usr/share/elasticsearch

[root@hfelkcld0001 elasticsearch]# ./stream2es twitter --authorize --key ${CONSUMER_KEY} --secret ${CONSUMER_SECRET}
...
... ==>  ,  ==>  ,  .authinfo.stream2es

[root@hfelkcld0001 elasticsearch]# ll ~/.authinfo.stream2es
-rw------- 1 root root 286 Apr 29 02:12 /root/.authinfo.stream2es

step3.1:
최신 트윗을 무작위로 가져오기
[root@hfelkcld0001 elasticsearch]# ./stream2es twitter --target http://hfelkcld0001:9200/twitter/status

step3.2
특정 키워드를 가져오는 tweets
[root@hfelkcld0001 elasticsearch]# ./stream2es twitter --track webex --target http://hfelkcld0001:9200/twitter/status

좋은 웹페이지 즐겨찾기