我使用存储库中的helm部署了德鲁伊,使用了来自https://github.com/apache/druid/tree/master/helm/druid的命令,并成功地部署了它,但是当我创建一个带有以下规范的任务时
{
"type": "index_parallel",
"id": "sairam_testing_postgresql_100",
"spec": {
"dataSchema": {
"dataSource": "test-ingestion-postgresql-100",
"timestampSpec": {
"format": "iso",
"column": "created_at"
},
"dimensionsSpec": {
"dimensions": [
"app_id","user_id"
]
}
},
"ioConfig": {
"type": "index_parallel",
"inputSource": {
"type": "sql",
"database": {
"type": "postgresql",
"connectorConfig": {
"connectURI": "jdbc:postgresql://35.200.128.167:5432/mhere_trans",
"user": "postgres@jiovishwam-frp-att-prod-mhere-trans-psql-db-1",
"password": "lFRWncdXG4Po0e"
}
},
"sqls": [
"SELECT app_id ,user_id FROM transactions limit 10"
]
}
},
"maxNumConcurrentSubTasks": 2,
"tuningConfig": {
"type": "index_parallel",
"partitionsSpec": {
"type": "dynamic"
}
}
}
}它抛出错误未能提交任务:无法构造问题的实例: java.lang.ClassNotFoundException: org.postgresql.Driver at org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexIngestionSpec["ioConfig"]->org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexIOConfig["inputSource"]->org.apache.druid.metadata.input.SqlInputSource["database"]">资料来源:(org.eclipse.jetty.server.HttpInputOverHTTP);一行: 1,列: 969
注意:我确实尝试过使用quickstart,并发现了类似的问题(通过手动将postgresql文件添加到lib目录中得到了修复),但不确定在生产中使用头盔图表部署德鲁伊时如何处理这个问题。
发布于 2022-07-18 17:58:36
根据docs 这里,为了将SQL数据源用于postgresql,需要在加载列表中添加扩展:
druid.extensions.loadList=["postgresql-metadata-storage"]如果使用舵机图表进行安装,则可以在自定义values.yaml的“常规参数”部分中指定此参数。
configVars:
druid_extensions_loadList: '["druid-histogram", "druid-datasketches", "druid-lookups-cached-global", "postgresql-metadata-storage"]注意:还请注意,虽然您可以使用JDBC连接从postgresql提取数据,但对于较大的数据集,建议您使用多个SQL语句,这样可以并行化摄入。
https://stackoverflow.com/questions/72994879
复制相似问题