priyankaku commented on code in PR #19449:
URL: https://github.com/apache/kafka/pull/19449#discussion_r2181713662


##########
connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java:
##########
@@ -291,6 +295,17 @@ public void configure(Map<String, ?> configs) {
 
         fromConnectSchemaCache = new SynchronizedCache<>(new 
LRUCache<>(config.schemaCacheSize()));
         toConnectSchemaCache = new SynchronizedCache<>(new 
LRUCache<>(config.schemaCacheSize()));
+
+        try {
+            final byte[] schemaContent = config.schemaContent();
+            if (schemaContent != null && schemaContent.length > 0) {
+                final JsonNode schemaNode = deserializer.deserialize("", 
schemaContent);
+                this.schema = asConnectSchema(schemaNode);
+            }
+        } catch (SerializationException e) {
+            throw new DataException("Failed to parse schema in converter 
config due to serialization error: ", e);
+        }
+

Review Comment:
   Addressed.



##########
connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverterConfig.java:
##########
@@ -36,6 +37,10 @@ public final class JsonConverterConfig extends 
ConverterConfig {
     private static final String SCHEMAS_ENABLE_DISPLAY = "Enable Schemas";
 
     public static final String SCHEMAS_CACHE_SIZE_CONFIG = 
"schemas.cache.size";
+    public static final String SCHEMA_CONTENT_CONFIG = "schema.content";

Review Comment:
   Addressed.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to