第一次在协调器上初始化查找时 Druid Postgresql 语法错误
Druid Postgresql syntax error while Initializing lookups on coordinator for first time
我正在尝试在集群范围的德鲁伊上设置查找。
如文档中所述-
http://druid.io/docs/latest/querying/lookups.html,
1. 已将 "druid-lookups-cached-global" 包含在我的加载列表中。
2. 我试图post一个空的json对象来初始化配置。
命令一运行:
curl -X 'POST' -d @blank.json http://localhost:8081/druid/coordinator/v1/lookups/config/
{localhost 是我在分布式 environment.My blank.json 中的协调器节点包含:{}}
这是我在 post 填空 json 时遇到的错误 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:'lookupsConfig'}, finder:[]}]
有人可以帮忙吗?
失败是因为我使用的是 postgresql 版本。低于 9.1 的 postgresql 版本不支持从德鲁伊触发的 Upsert 语句。
我正在尝试在集群范围的德鲁伊上设置查找。
如文档中所述- http://druid.io/docs/latest/querying/lookups.html, 1. 已将 "druid-lookups-cached-global" 包含在我的加载列表中。 2. 我试图post一个空的json对象来初始化配置。
命令一运行:
curl -X 'POST' -d @blank.json http://localhost:8081/druid/coordinator/v1/lookups/config/
{localhost 是我在分布式 environment.My blank.json 中的协调器节点包含:{}}
这是我在 post 填空 json 时遇到的错误 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:'lookupsConfig'}, finder:[]}]
有人可以帮忙吗?
失败是因为我使用的是 postgresql 版本。低于 9.1 的 postgresql 版本不支持从德鲁伊触发的 Upsert 语句。