KKcorps commented on code in PR #10030:
URL: https://github.com/apache/pinot/pull/10030#discussion_r1065352035


##########
pinot-plugins/pinot-input-format/pinot-protobuf/src/main/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufUtils.java:
##########
@@ -65,4 +75,114 @@ public static File createLocalFile(URI srcURI, File dstDir) 
{
         + "buffer descriptor {}", dstFile.getAbsolutePath(), srcURI);
     return dstFile;
   }
+
+  public static Descriptors.Descriptor buildDescriptor(String messageName, 
String descFilePathOpt) {
+    if (descFilePathOpt != null && !descFilePathOpt.isEmpty()) {
+      return getDescriptor(descFilePathOpt, messageName);
+    } else {
+      return buildDescriptorFromJavaClass(messageName);
+    }
+  }
+
+  /**
+   *  Loads the given protobuf class and returns Protobuf descriptor for it.
+   */
+  private static Descriptors.Descriptor buildDescriptorFromJavaClass(String 
protobufClassName) {
+    Class<?> protobufClass;
+    try {
+      protobufClass = Class.forName(protobufClassName);

Review Comment:
   How is the user expected to upload class? e.g. if 30 pinot servers are 
running, users should copy their jar to all of them and then restart?



-- 
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-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to