I am trying to setup lookups on a cluster-wide druid.
As mentioned in the doc- http://druid.io/docs/latest/querying/lookups.html , 1. Have included "druid-lookups-cached-global" in my load list. 2. I tried to post an empty json object to initialize the configuration.
Command I ran:
curl -X 'POST' -d @blank.json http://localhost:8081/druid/coordinator/v1/lookups/config/
{localhost is my coordinator node in a distributed environment.My blank.json contains : {}}
This is the error I am getting while posting the blank json:
org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "UPDATE" Position: 18 [statement:"BEGIN; LOCK TABLE druid_config IN SHARE ROW EXCLUSIVE MODE; WITH upsert AS (UPDATE druid_config SET payload=:value WHERE name=:key RETURNING *) INSERT INTO druid_config (name, payload) SELECT :key, :value WHERE NOT EXISTS (SELECT * FROM upsert) ;COMMIT;", located:"BEGIN; LOCK TABLE druid_config IN SHARE ROW EXCLUSIVE MODE; WITH upsert AS (UPDATE druid_config SET payload=:value WHERE name=:key RETURNING *) INSERT INTO druid_config (name, payload) SELECT :key, :value WHERE NOT EXISTS (SELECT * FROM upsert) ;COMMIT;", rewritten:"BEGIN; LOCK TABLE druid_config IN SHARE ROW EXCLUSIVE MODE; WITH upsert AS (UPDATE druid_config SET payload=? WHERE name=? RETURNING *) INSERT INTO druid_config (name, payload) SELECT ?, ? WHERE NOT EXISTS (SELECT * FROM upsert) ;COMMIT;", arguments:{ positional:{}, named:{value:[123, 125],key:'lookupsC onfig'}, finder:[]}]
Can someone help?
The failure was due to postgresql version I was using. Upsert statements, which were getting fired from druid, are not supported in postgresql version lower than 9.1.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.