无法在Elasticsearch中创建Phoenix JDBC河

时间:2014-12-20 22:01:12

标签: elasticsearch hbase phoenix elasticsearch-jdbc-river

程序:Hbase 0.98,Elasticsearch 1.4.2和Phoenix 4.2.2

尝试为Elasticsearch创建JDBC河时

curl -XPUT 'localhost:9200/_river/phoenix_jdbc_river/_meta' -d '{
    "type" : "jdbc",
    "jdbc" : {
        "url" : "jdbc:phoenix:localhost",
        "user" : "",
        "password" : "",
        "sql" : "select * from test.orders"
    }
}'

在终端

中收到错误
[ERROR][river.jdbc.RiverPipeline ] java.sql.SQLFeatureNotSupportedException
java.io.IOException: java.sql.SQLFeatureNotSupportedException
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.fetch(SimpleRiverSource.java:341)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.fetch(SimpleRiverFlow.java:220)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverFlow.execute(SimpleRiverFlow.java:149)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.request(RiverPipeline.java:88)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:66)
    at org.xbib.elasticsearch.plugin.jdbc.RiverPipeline.call(RiverPipeline.java:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLFeatureNotSupportedException
    at org.apache.phoenix.jdbc.PhoenixStatement.setQueryTimeout(PhoenixStatement.java:1239)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.execute(SimpleRiverSource.java:380)
    at org.xbib.elasticsearch.river.jdbc.strategy.simple.SimpleRiverSource.fetch(SimpleRiverSource.java:320)
    ... 9 more.

您能帮忙弄清楚问题是什么以及如何解决?

1 个答案:

答案 0 :(得分:2)

请将jdbc:phoenix:localhost替换为jdbc:phoenix:localhost:/hbase-unsecure