我想知道在融合中心使用数据生成连接器的过程,以便为测试主题生成随机数据。
我尝试使用某些设置连接数据源连接器,但始终失败。
更新:我尝试连接自己在主题中创建的架构,但未将其选中,并且数据生成连接器无法启动。
这是datagen connect的配置:
{
"value.converter.schema.registry.url": "http://localhost:8081",
"value.converter.schemas.enable": "false",
"name": "datagen-protobuf-userprofile",
"connector.class": "io.confluent.kafka.connect.datagen.DatagenConnector",
"tasks.max": "1",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "io.confluent.connect.protobuf.ProtobufConverter",
"transforms": [
"SetSchemaMetadata"
],
"transforms.SetSchemaMetadata.type": "org.apache.kafka.connect.transforms.SetSchemaMetadata$Value",
"transforms.SetSchemaMetadata.schema.name": "value_User_PROFILE",
"kafka.topic": "User_PROFILE",
"max.interval": "1000",
"iterations": "10000000",
"schema.filename": "value_User_PROFILE",
"schema.keyfield": "userid",
"quickstart": "value_User_PROFILE"
}
新主题中定义的架构:
{
"doc": "Sample schema to help you get started.",
"fields": [
{
"doc": "The int type is a 32-bit signed integer.",
"name": "userid",
"type": "int"
},
{
"doc": "The string is a unicode character sequence.",
"name": "firstname",
"type": "string"
},
{
"doc": "The string is a unicode character sequence.",
"name": "lastname",
"type": "string"
},
{
"doc": "The string is a unicode character sequence.",
"name": "countrycode",
"type": "string"
},
{
"doc": "this si double which store floting value as well",
"name": "rating",
"type": "double"
}
],
"name": "value_User_PROFILE",
"namespace": "com.mycorp.mynamespace",
"type": "record"
}
答案 0 :(得分:0)
您可以尝试以下步骤:
connect-ip:8083/connector-plugins
以确认连接器是否正确装入)