druidkafka索引服务设置

yacmzcpb  于 2021-06-07  发布在  Kafka
关注(0)|答案(2)|浏览(248)

我按照文件编辑:

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 ,的 typekafka ?
有没有办法检查扩展是否正确加载,或者我必须在每个组件的 runtime.properties ?

w1e3prcc

w1e3prcc1#

json规范将在霸王的这个端点上发送 /druid/indexer/v1/supervisor ```
curl -X POST -H 'Content-Type: application/json' -d @kafka_connect/script.json http://druid_server:8090/druid/indexer/v1/supervisor

eaf3rand

eaf3rand2#

我遇到了类似的问题,我修改了conf/druid/\u common/common.runtime.properties文件,在druid.extensions.loadlist中添加了“druid-kafka索引服务”,现在它的显示如下:

druid.extensions.loadList=["druid-parser-route", "mysql-metadata-storage", "druid-kafka-indexing-service"]

希望能帮助别人

相关问题