amaechler commented on code in PR #18401:
URL: https://github.com/apache/druid/pull/18401#discussion_r2275294480


##########
extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/DescriptorBasedProtobufBytesDecoder.java:
##########
@@ -20,31 +20,50 @@
 package org.apache.druid.data.input.protobuf;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
-import com.github.os72.protobuf.dynamic.DynamicSchema;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.protobuf.ByteString;
+import com.google.protobuf.DescriptorProtos;
 import com.google.protobuf.Descriptors;
 import com.google.protobuf.DynamicMessage;
-import org.apache.druid.java.util.common.StringUtils;
+import org.apache.druid.java.util.common.IAE;
 import org.apache.druid.java.util.common.parsers.ParseException;
 
+import javax.annotation.Nullable;
 import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Objects;
-import java.util.Set;
+import java.util.TreeSet;
 
+/**
+ * Abstract base class for protobuf bytes decoders that use Google's protobuf 
library directly
+ * to parse binary descriptor sets and decode protobuf messages.
+ *
+ * <p>This class provides common functionality for loading protobuf 
descriptors from various sources
+ * and decoding binary protobuf messages into {@link DynamicMessage} objects. 
Concrete implementations
+ * define how to obtain the protobuf descriptor set (e.g., from files or 
inline base64 strings).
+ */
 public abstract class DescriptorBasedProtobufBytesDecoder implements 
ProtobufBytesDecoder
 {
   private Descriptors.Descriptor descriptor;
+
+  /**
+   * An optional message Protobuf message type in the descriptor. Both short 
name and fully qualified name are accepted.

Review Comment:
   Copied from our docs.



##########
extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/SchemaRegistryBasedProtobufBytesDecoder.java:
##########


Review Comment:
   Just added a few comments to this file (and made the constructor a bit 
cleaner) while reading through this file to understand what is happening.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to