clintropolis commented on a change in pull request #10839:
URL: https://github.com/apache/druid/pull/10839#discussion_r588755780



##########
File path: 
extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/SchemaRegistryBasedProtobufBytesDecoder.java
##########
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.data.input.protobuf;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.annotations.VisibleForTesting;
+import com.google.protobuf.Descriptors;
+import com.google.protobuf.DynamicMessage;
+import io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient;
+import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient;
+import 
io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException;
+import io.confluent.kafka.schemaregistry.protobuf.ProtobufSchema;
+import io.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaProvider;
+import org.apache.druid.java.util.common.logger.Logger;
+import org.apache.druid.java.util.common.parsers.ParseException;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Collections;
+
+public class SchemaRegistryBasedProtobufBytesDecoder implements 
ProtobufBytesDecoder
+{
+
+  private static final Logger LOGGER = new 
Logger(SchemaRegistryBasedProtobufBytesDecoder.class);
+
+  private final SchemaRegistryClient registry;
+  private int identityMapCapacity;
+
+  @JsonCreator
+  public SchemaRegistryBasedProtobufBytesDecoder(
+      @JsonProperty("url") String url,
+      @JsonProperty("capacity") Integer capacity

Review comment:
       Oops, I forgot about one thing, could you add support for supplying 
config and headers to the schema registry client? See 
https://github.com/apache/druid/pull/10314/files#diff-29d909859e829594d32e7d39a72d233c9947cedf9b35ddf9e4566547799adb0fR51-R52
 for details (and docs could be more or less copied too probably 
https://github.com/apache/druid/pull/10314/files#diff-b5e5f4cf38f24309777ff1750a3ed7d5f55492afe2e8eded4f7f71337b2c4a90R1041)




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

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