# Druid 加载 Kafka 数据时通过控制台来提交一个 supervisor

**URL:** <https://www.isharkfly.com/t/druid-kafka-supervisor/13655>\
**Category:** BigData\
**Tags:** druid\
**Created:** [August 6, 2021, 6:49pm UTC](https://www.isharkfly.com/t/druid-kafka-supervisor/13655 "2021-08-06T18:49:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [August 6, 2021, 6:49pm UTC](https://www.isharkfly.com/t/druid-kafka-supervisor/13655/1 "2021-08-06T18:49:19Z")

</div>

在控制台中，单击 `Submit supervisor` 来打开一个 supervisor 对话框。

![Submit supervisor](https://www.isharkfly.com/images/transparent.png "Submit supervisor")

请将下面的内容配置参数拷贝张贴到打开的对话框中，然后单击 `Submit` 提交。

```json
{
  "type": "kafka",
  "spec" : {
    "dataSchema": {
      "dataSource": "wikipedia",
      "timestampSpec": {
        "column": "time",
        "format": "auto"
      },
      "dimensionsSpec": {
        "dimensions": [
          "channel",
          "cityName",
          "comment",
          "countryIsoCode",
          "countryName",
          "isAnonymous",
          "isMinor",
          "isNew",
          "isRobot",
          "isUnpatrolled",
          "metroCode",
          "namespace",
          "page",
          "regionIsoCode",
          "regionName",
          "user",
          { "name": "added", "type": "long" },
          { "name": "deleted", "type": "long" },
          { "name": "delta", "type": "long" }
        ]
      },
      "metricsSpec" : [],
      "granularitySpec": {
        "type": "uniform",
        "segmentGranularity": "DAY",
        "queryGranularity": "NONE",
        "rollup": false
      }
    },
    "tuningConfig": {
      "type": "kafka",
      "reportParseExceptions": false
    },
    "ioConfig": {
      "topic": "wikipedia",
      "inputFormat": {
        "type": "json"
      },
      "replicas": 2,
      "taskDuration": "PT10M",
      "completionTimeout": "PT20M",
      "consumerProperties": {
        "bootstrap.servers": "localhost:9092"
      }
    }
  }
}

```

上面将会启动一个 supervisor，启动 supervisor 将会负责对任务进行管理，使用启动的任务来完成对数据的输入和从 Kafka 中获取数据。
