elasticsearch jdbc river polling--- load data from mysql repeatedly
When using https://github.com/jprante/elasticsearch-river-jdbc I notice
that the following curl statement successfully indexes data the first
time. However, the river fails to repeatedly poll the database for
updates.
To restate, when I run the following, the river successfully connects to
MySQL, runs the query successfully, indexes the results, but never runs
the query again.
curl -XPUT '127.0.0.1:9200/_river/projects_river/_meta' -d '{
"type" : "jdbc",
"index" : {
"index" : "test_projects",
"type" : "project",
"bulk_size" : 100,
"max_bulk_requests" : 1,
"autocommit": true
},
"jdbc" : {
"driver" : "com.mysql.jdbc.Driver",
"poll" : "1m",
"strategy" : "simple",
"url" : "jdbc:mysql://localhost:3306/test",
"user" : "root",
"sql" : "SELECT name, updated_at from projects p where p.updated_at >
date_sub(now(),interval 1 minute)"
}
}'
Tailing the log, I see: [2013-09-27 16:32:24,482][INFO
][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow] next run,
waiting 1m [2013-09-27 16:33:24,488][INFO
][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow] next run,
waiting 1m [2013-09-27 16:34:24,494][INFO
][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow] next run,
waiting 1m [2013-09-27 16:35:24,499][INFO
][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow] next run,
waiting 1m [2013-09-27 16:36:24,504][INFO
][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow] next run,
waiting 1m [2013-09-27 16:37:24,509][INFO
][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow] next run,
waiting 1m [2013-09-27 16:38:24,512][INFO
][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow] next run,
waiting 1m [2013-09-27 16:39:24,516][INFO
][org.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow] next run,
waiting 1m
But the index stays empty. Running on a macbook pro with elasticsearch
version stable 0.90.2, HEAD and mysql-connector-java-5.1.25-bin.jar in the
river pligns directory.
No comments:
Post a Comment