You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/09/01 02:16:52 UTC

[GitHub] [druid] xotlr92 opened a new issue, #13011: Error when collecting Confluent Kafka data with Json SchemaType Schema Registry

xotlr92 opened a new issue, #13011:
URL: https://github.com/apache/druid/issues/13011

   **Affected Version**
   
   0.23.0
   
   **Description**
   
   When collecting Kafka data, schema setting is required through Schema Registry, but since the SchemaType of Confluent Kafka is JSON, not AVRO, the part estimated to be SchemaId cannot be parsed as shown below
   
   * spec
   ```
   {
     "type": "kafka",
     "spec": {
       "ioConfig": {
         "type": "kafka",
         "consumerProperties": {
           "bootstrap.servers": "kafka1:9092"
         },
         "topic": "topic1",
         "inputFormat": {
           "type": "json"
         }
       },
       "tuningConfig": {
         "type": "kafka"
       },
       "dataSchema": {
         "dataSource": "topic1"
       }
     }
   }
   ```
   * data
   ```
   Unable to parse row [�{"Idx":34834343,"RegDate":1661419980000,"ServerID":1234,"ServerIP":"11.111.111.111","CCU":1234,"CCUAll":1234,"AOSUserCount":1234,"IOSUserCount":1234,"CCUDate":1234,"SessionType":1234}] into JSON
   Unable to parse row [�{"Idx":34834345,"RegDate":1661419980000,"ServerID":1234,"ServerIP":"12.123.123.123","CCU":1234,"CCUAll":1234,"AOSUserCount":1234,"IOSUserCount":1234,"CCUDate":1234,"SessionType":1234}] into JSON
   ```
   
   For Schema Registry settings, I set 'avro_stream' inputFormat and attempted collection. but, An error occurred that the schema could not be found because the SchemaType is not AVRO.
   * spec
   ```
   {
     "type": "kafka",
     "spec": {
       "ioConfig": {
         "type": "kafka",
         "consumerProperties": {
           "bootstrap.servers": "kafka1:9092"
         },
         "topic": "topic1",
         "inputFormat": {
           "type": "avro_stream",
           "binaryAsString": false,
           "avroBytesDecoder": {
             "type": "schema_registry",
             "url": "http://kafka-sr1:8081"
           }
         }
       },
       "tuningConfig": {
         "type": "kafka"
       },
       "dataSchema": {
         "dataSource": "topic1"
       }
     }
   ```
   * error
   ```
   Error: Failed to sample data: Failed to get Avro schema: 4084
   ```
   
   When I checked, the data was serialized to KafkaJsonSchemaSerializer, so I loaded the related jar file into the druid-kafka-indexing-service extension, set the value.deserializer value to consumerProperties, and tested it. but the following error occurred.
   
   * spec
   ```
   {
     "type": "kafka",
     "spec": {
       "ioConfig": {
         "type": "kafka",
         "consumerProperties": {
           "bootstrap.servers": "kafka1:9092",
           "value.deserializer": "io.confluent.kafka.serializers.json.KafkaJsonSchemaDeserializer"
         },
         "topic": "topic1",
         "inputFormat": {
           "type": "json"
         }
       },
       "tuningConfig": {
         "type": "kafka"
       },
       "dataSchema": {
         "dataSource": "topic1"
       }
     }
   }
   ```
   * error
   ```
   Error: Unable to create RecordSupplier: Kafka deserializers must return a byte array (byte[]), io.confluent.kafka.serializers.json.KafkaJsonSchemaDeserializer returns T
   ```
   I wonder if Kafka data cannot be collected through the Schema Registry, which is JSON Schema Type.
   


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [I] Error when collecting Confluent Kafka data with Json SchemaType Schema Registry (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #13011:
URL: https://github.com/apache/druid/issues/13011#issuecomment-1931000542

   This issue has been closed due to lack of activity. If you think that
   is incorrect, or the issue requires additional review, you can revive the issue at
   any time.


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [I] Error when collecting Confluent Kafka data with Json SchemaType Schema Registry (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #13011: Error when collecting Confluent Kafka data with Json SchemaType Schema Registry
URL: https://github.com/apache/druid/issues/13011


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [I] Error when collecting Confluent Kafka data with Json SchemaType Schema Registry (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #13011:
URL: https://github.com/apache/druid/issues/13011#issuecomment-1882031362

   This issue has been marked as stale due to 280 days of inactivity.
   It will be closed in 4 weeks if no further activity occurs. If this issue is still
   relevant, please simply write any comment. Even if closed, you can still revive the
   issue at any time or discuss it on the dev@druid.apache.org list.
   Thank you for your contributions.


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org