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/24 22:03:42 UTC

[GitHub] [pinot] jackjlli commented on a diff in pull request #9588: add validation for proto decoder

jackjlli commented on code in PR #9588:
URL: https://github.com/apache/pinot/pull/9588#discussion_r1003811504


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -458,6 +461,19 @@ public static void validateIngestionAggregation(String name) {
         String.format("aggregation function %s must be one of %s", name, SUPPORTED_INGESTION_AGGREGATIONS));
   }
 
+  @VisibleForTesting
+  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")) {

Review Comment:
   nit: could we put these constants to a class and have some comments to explain that these are the required fields for protobuf message decoder?



-- 
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