我正在尝试创建架构,但出现错误,这是:
bin/pinot-admin.sh AddTable -tableConfigFile $PDATA_HOME table-config.json -schemaFile schema-config.json -controllerPort 9000 -exec 执行命令:AddTable -tableConfigFile table-config.json -schemaFile schema-config.json -controllerProtocol http -controllerHost 172.31.10.219 -controllerPort 9000 -exec 发送请求:http ://172.31.10.219:9000/schemas到控制器:localhost,版本:未知 上传 Pinot 模式时出现异常:myschema org.apache.pinot.common.exception。 HttpErrorStatusException:得到错误状态代码:400(错误请求),原因:“无法添加无效架构:myschema。原因:null”,同时发送请求: http: //172.31.10.219 :9000/schemas到控制器:localhost,版本:在 org.apache.pinot.common.utils.FileUploadDownloadClient.sendRequest(FileUploadDownloadClient.java:397) 处未知 ~[pinot-all-0.7.0-SNAPSHOT-jar-with-dependencies.jar:0.7 .0-SNAPSHOT-d87755899eccba3554e9cc39a1439d5ecb53aaac]
表配置:
{
"tableName": "eventflow",
"tableType": "REALTIME",
"segmentsConfig": {
"timeColumnName": "_source.sDate",
"timeType": "MILLISECONDS",
"schemaName": "myschema",
"replicasPerPartition": "1"
},
"tenants": {},
"tableIndexConfig": {
"loadMode": "MMAP",
"streamConfigs": {
"streamType": "kafka",
"stream.kafka.consumer.type": "lowlevel",
"stream.kafka.topic.name": "mytopic",
"stream.kafka.decoder.class.name": "org.apache.pinot.plugin.stream.kafka.KafkaJSONMessageDecoder",
"stream.kafka.consumer.factory.class.name": "org.apache.pinot.plugin.stream.kafka20.KafkaConsumerFactory",
"stream.kafka.broker.list": "localhost:9876",
"realtime.segment.flush.threshold.time": "3600000",
"realtime.segment.flush.threshold.size": "50000",
"stream.kafka.consumer.prop.auto.offset.reset": "smallest"
}
},
"metadata": {
"customConfigs": {}
}
}
和架构配置:
{
"schemaName": "myschema",
"eventflow": [
{
"name": "_index",
"dataType": "INT"
},
{
"name": "_type",
"dataType": "STRING"
},
{
"name": "id",
"dataType": "INT"
}
],
"dateTimeFieldSpecs": [
{
"name": "_source.sDate",
"dataType": "STRING",
"format": "1:SECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd HH:mm:ss",
"granularity": "1:DAYS"
}
]
}