You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/10/19 22:42:47 UTC
[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #9588: add validation for proto decoder
Jackie-Jiang commented on code in PR #9588:
URL: https://github.com/apache/pinot/pull/9588#discussion_r999992682
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -458,6 +461,18 @@ public static void validateIngestionAggregation(String name) {
String.format("aggregation function %s must be one of %s", name, SUPPORTED_INGESTION_AGGREGATIONS));
}
+ static void validateDecoder(StreamConfig streamConfig) {
Review Comment:
(minor) Annotate with `@VisiableForTesting`
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -458,6 +461,18 @@ public static void validateIngestionAggregation(String name) {
String.format("aggregation function %s must be one of %s", name, SUPPORTED_INGESTION_AGGREGATIONS));
}
+ static void validateDecoder(StreamConfig streamConfig) {
+ if (streamConfig.getDecoderClass().equals("org.apache.pinot.plugin.inputformat.protobuf.ProtoBufMessageDecoder")) {
+ // check the existence of the needed decoder props
+ if (!streamConfig.getDecoderProperties().containsKey("stream.kafka.decoder.prop.descriptorFile")) {
+ throw new IllegalStateException("Missing property of descriptorFile for ProtoBufMessageDecoder");
+ }
+ if (!streamConfig.getDecoderProperties().containsKey("stream.kafka.decoder.prop.protoClassName")) {
Review Comment:
It this mandatory? Per the implementation, seems it is optional. cc @KKcorps
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org