mozilla-services / heka

DEPRECATED: Data collection and processing made easy.
http://hekad.readthedocs.org/
Other
3.4k stars 531 forks source link

kafka-Inpuut error #1995

Closed kadisyy closed 5 years ago

kadisyy commented 5 years ago

I just test kafkaInput , kafka version: 1.1.0。 code: `[kafkaInputTest] type = "KafkaInput" topic = "jie" addrs = ["172.20.3.50:9092"] splitter = "KafkaSplitter" decoder = "ProtobufDecoder"

[KafkaSplitter] type = "NullSplitter" use_message_bytes = true `

But error: 2018/09/17 15:43:38 Configuration test: 'default' was not found

I am so confused。 and After read source code:

` configFile := flag.String("config", "flood.toml", "Heka Flood configuration file") configTest := flag.String("test", "default", "Test section to load")

flag.Parse()

if flag.NFlag() == 0 {
    flag.PrintDefaults()
    os.Exit(0)
}

var config FloodConfig
if _, err := toml.DecodeFile(*configFile, &config); err != nil {
    client.LogError.Printf("Error decoding config file: %s", err)
    return
}
var test FloodTest
var ok bool
if test, ok = config[*configTest]; !ok {
    client.LogError.Printf("Configuration test: '%s' was not found", *configTest)
    return
}`