You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/04 13:23:38 UTC

[GitHub] [pulsar] nicoloboschi opened a new pull request, #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)

nicoloboschi opened a new pull request, #15432:
URL: https://github.com/apache/pulsar/pull/15432

   ### Motivation
   Avro native objects for Arrays and Maps are not supported by the sink.
   
   If you try to use a Java POJO with a java.util.List/java.util.Set field with Avro Schema, you get:
   ```
   022-04-26T11:56:51.477776276Z Caused by: java.lang.ClassCastException: class org.apache.avro.generic.GenericData$Array cannot be cast to class [Ljava.lang.Object; (org.apache.avro.generic.GenericData$Array is in unnamed module of loader 'app'; [Ljava.lang.Object; is in module java.base of loader 'bootstrap')
   ```
   
   For java.util.Map
   
   ```
   2022-04-26T12:03:34.776219894Z java.lang.IllegalArgumentException: Error while converting a value of type class java.util.HashMap to a MAP: java.lang.ClassCastException: class org.apache.avro.util.Utf8 cannot be cast to class java.lang.String (org.apache.avro.util.Utf8 is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
   ```
   
   ### Modifications
   
   * Handle GenericData.Array instances
   * Handle Map with UUID as entry key
   
   See the same issue in the ElasticSearch sink https://github.com/apache/pulsar/pull/15430
   - [x] `no-need-doc` 
   


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

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


[GitHub] [pulsar] nicoloboschi merged pull request #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)

Posted by GitBox <gi...@apache.org>.
nicoloboschi merged PR #15432:
URL: https://github.com/apache/pulsar/pull/15432


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

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


[GitHub] [pulsar] nicoloboschi commented on pull request #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)

Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on PR #15432:
URL: https://github.com/apache/pulsar/pull/15432#issuecomment-1128650548

   @dlg99 @cbornet PTAL 


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

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


[GitHub] [pulsar] nicoloboschi closed pull request #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)

Posted by GitBox <gi...@apache.org>.
nicoloboschi closed pull request #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)
URL: https://github.com/apache/pulsar/pull/15432


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

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


[GitHub] [pulsar] cbornet commented on pull request #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)

Posted by GitBox <gi...@apache.org>.
cbornet commented on PR #15432:
URL: https://github.com/apache/pulsar/pull/15432#issuecomment-1142208502

   /pulsarbot rerun-failure-checks


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

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


[GitHub] [pulsar] cbornet commented on pull request #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)

Posted by GitBox <gi...@apache.org>.
cbornet commented on PR #15432:
URL: https://github.com/apache/pulsar/pull/15432#issuecomment-1142207695

   LGTM


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

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


[GitHub] [pulsar] nicoloboschi commented on pull request #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)

Posted by GitBox <gi...@apache.org>.
nicoloboschi commented on PR #15432:
URL: https://github.com/apache/pulsar/pull/15432#issuecomment-1134828994

   /pulsarbot rerun-failure-checks


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

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


[GitHub] [pulsar] nicoloboschi closed pull request #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)

Posted by GitBox <gi...@apache.org>.
nicoloboschi closed pull request #15432: [fix][kinesis-sink] Handle Avro collections native types (GenericData.Array and Utf8 map keys)
URL: https://github.com/apache/pulsar/pull/15432


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

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