我按照文档进行了编辑:
druid-0.9.2/conf/druid/_common/common.runtime.properties
并补充说:
"druid-kafka-indexing-service"
并druid.extensions.loadList
重新启动所有 druid 服务:middlemanager
, overlord
, coordinator
, broker
,historical
我跑了:
curl -X 'POST' -H 'Content-Type:application/json' -d @kafka_connect/script.json druid_server:8090/druid/indexer/v1/task
但得到:
{"error":"Could not resolve type id 'kafka' into a subtype of [simple type, class io.druid.indexing.common.task.Task]\n at [Source: HttpInputOverHTTP@4c467f1c; line: 1, column: 4]"}
输入 json 有:
{
"type": "kafka",
"dataSchema": {
"dataSource": "sensors-kafka",
"parser": {
"type": "string",
"parseSpec": {
"format": "json",
"timestampSpec": {
"column": "timestamp",
"format": "auto"
},
"dimensionsSpec": {
"dimensions": ["machine", "key"],
"dimensionExclusions": [
"timestamp",
"value"
]
}
}
},
"metricsSpec": [
{
"name": "count",
"type": "count"
},
{
"name": "value_sum",
"fieldName": "value",
"type": "doubleSum"
},
{
"name": "value_min",
"fieldName": "value",
"type": "doubleMin"
},
{
"name": "value_max",
"fieldName": "value",
"type": "doubleMax"
}
],
"granularitySpec": {
"type": "uniform",
"segmentGranularity": "HOUR",
"queryGranularity": "NONE"
}
},
"tuningConfig": {
"type": "kafka",
"maxRowsPerSegment": 5000000
},
"ioConfig": {
"topic": "sensor",
"consumerProperties": {
"bootstrap.servers": "kafka_server:2181"
},
"taskCount": 1,
"replicas": 1,
"taskDuration": "PT1H"
}
}
知道我做错了什么吗?根据文档:
http://druid.io/docs/0.9.2-rc3/development/extensions-core/kafka-ingestion.html
,type
是kafka
?
有没有办法检查扩展是否正确加载,或者我是否必须在每个组件中指定扩展runtime.properties
?