How to search data when use elasticsearch-kafka-river


(xiaomingfeng99) #1

Hello,
I install elasticsearch-kafka-river plugin on elasticsearch-0.90.0,and it
works,ES log show my data insert successful.
but when I use curl to get data from ES, it only show me the last record.

How can I get all the data from ES use curl.
Thanks!

KafkaRiverWorker is running:
[2014-05-21 15:44:32,015][INFO ][org.apache.zookeeper.ZooKeeper] Client
environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
[2014-05-21 15:44:32,015][INFO ][org.apache.zookeeper.ZooKeeper] Client
environment:java.io.tmpdir=/tmp
[2014-05-21 15:44:32,015][INFO ][org.apache.zookeeper.ZooKeeper] Client
environment:java.compiler=
[2014-05-21 15:44:32,015][INFO ][org.apache.zookeeper.ZooKeeper] Client
environment:os.name=Linux
[2014-05-21 15:44:32,015][INFO ][org.apache.zookeeper.ZooKeeper] Client
environment:os.arch=amd64
[2014-05-21 15:44:32,016][INFO ][org.apache.zookeeper.ZooKeeper] Client
environment:os.version=2.6.32-358.6.1.el6.x86_64
[2014-05-21 15:44:32,016][INFO ][org.apache.zookeeper.ZooKeeper] Client
environment:user.name=root
[2014-05-21 15:44:32,016][INFO ][org.apache.zookeeper.ZooKeeper] Client
environment:user.home=/root
[2014-05-21 15:44:32,016][INFO ][org.apache.zookeeper.ZooKeeper] Client
environment:user.dir=/root/storage/es-kafka/elasticsearch-0.90.0
[2014-05-21 15:44:32,017][INFO ][org.apache.zookeeper.ZooKeeper] Initiating
client connection, connectString=localhost sessionTimeout=1000
watcher=com.netflix.curator.ConnectionState@2c0e6070
[2014-05-21 15:44:32,029][INFO ][org.apache.zookeeper.ClientCnxn] Opening
socket connection to server localhost/127.0.0.1:2181
[2014-05-21 15:44:32,031][INFO ][org.apache.zookeeper.ClientCnxn] Socket
connection established to localhost/127.0.0.1:2181, initiating session
[2014-05-21 15:44:32,046][INFO ][org.apache.zookeeper.ClientCnxn] Session
establishment complete on server localhost/127.0.0.1:2181, sessionid =
0x1461d9037c20001, negotiated timeout = 6000
[2014-05-21 15:44:32,064][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] Created statsd client for prefix=es-kafka-river,
host=localhost, port=8125
[2014-05-21 15:44:32,065][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] KafkaRiverWorker is running...
[2014-05-21 15:44:32,080][INFO ][cluster.metadata ] [Black Fox]
[_river] update_mapping [my_kafka_river_0] (dynamic)
[2014-05-21 15:44:42,370][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] localhost:9092/0521003:0 0 msg (0.00 msg/s),
flushed 0 (0 err, 0 succ) [msg backlog 0 B]
[2014-05-21 15:44:52,382][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] localhost:9092/0521003:0 0 msg (0.00 msg/s),
flushed 0 (0 err, 0 succ) [msg backlog 0 B]
[2014-05-21 15:45:02,394][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] localhost:9092/0521003:0 0 msg (0.00 msg/s),
flushed 0 (0 err, 0 succ) [msg backlog 0 B]
[2014-05-21 15:45:12,409][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] localhost:9092/0521003:0 0 msg (0.00 msg/s),
flushed 0 (0 err, 0 succ) [msg backlog 2.09 KB]
[2014-05-21 15:45:12,521][INFO ][cluster.metadata ] [Black Fox]
[_river] update_mapping [my_kafka_river_0] (dynamic)
[2014-05-21 15:45:22,633][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] localhost:9092/0521003:0 20 msg (1.96 msg/s),
flushed 2 (0 err, 20 succ) [msg backlog 0 B]
[2014-05-21 15:45:32,690][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] localhost:9092/0521003:0 10 msg (0.99 msg/s),
flushed 1 (0 err, 10 succ) [msg backlog 0 B]
[2014-05-21 15:45:42,739][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] localhost:9092/0521003:0 10 msg (1.00 msg/s),
flushed 1 (0 err, 10 succ) [msg backlog 0 B]
[2014-05-21 15:45:52,788][INFO ][river.kafka ] [Black Fox]
[kafka][my_kafka_river_0] localhost:9092/0521003:0 10 msg (1.00 msg/s),
flushed 1 (0 err, 10 succ) [msg backlog 0 B]

[root@CNC-JN-O-5A1 es-kafka]# curl -XGET
'localhost:9200/_river/my_kafka_river_0/_meta' -d '{"query" : {"match_all"
: {}}}'
{"_index":"_river","_type":"my_kafka_river_0","_id":"_meta","_version":1681,"exists":true,
"_source" : {"time":"[2014-05-21
16:13:03]","IP":"172.16.241.208","data":"0.41 10892 9125m 487092 13541m
0 0 0 0 567 817 0 1 99"}}[root@CNC-JN-O-5A1 es-kafka]#
[root@CNC-JN-O-5A1 es-kafka]#
[root@CNC-JN-O-5A1 es-kafka]# curl -XGET
'localhost:9200/_river/my_kafka_river_0/_meta'
{"_index":"_river","_type":"my_kafka_river_0","_id":"_meta","_version":1691,"exists":true,
"_source" : {"time":"[2014-05-21
16:13:13]","IP":"172.16.241.208","data":"0.42 10892 9122m 487092 13541m
0 0 0 0 580 793 0 1 98"}}[root@CNC-JN-O-5A1 es-kafka]#
[root@CNC-JN-O-5A1 es-kafka]#
[root@CNC-JN-O-5A1 es-kafka]# curl -XGET
'localhost:9200/_river/my_kafka_river_0/_meta' -d '{"query" : {"match_all"
: {}}}'
{"_index":"_river","_type":"my_kafka_river_0","_id":"_meta","_version":1691,"exists":true,
"_source" : {"time":"[2014-05-21
16:13:13]","IP":"172.16.241.208","data":"0.42 10892 9122m 487092 13541m
0 0 0 0 580 793 0 1 98"}}[root@CNC-JN-O-5A1 es-kafka]#
[root@CNC-JN-O-5A1 es-kafka]#
[root@CNC-JN-O-5A1 es-kafka]# curl -XGET
'localhost:9200/_river/my_kafka_river_0/_meta' -d '{"query" : {"match_all"
: {}}}'
{"_index":"_river","_type":"my_kafka_river_0","_id":"_meta","_version":1701,"exists":true,
"_source" : {"time":"[2014-05-21
16:13:23]","IP":"172.16.241.208","data":"0.44 10892 9122m 487092 13541m
0 0 0 0 463 770 0 0 99"}}[root@CNC-JN-O-5A1 es-kafka]#
[root@CNC-JN-O-5A1 es-kafka]#
[root@CNC-JN-O-5A1 es-kafka]#

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/65a64a9b-31e6-489f-8bae-064fb5c2e943%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2