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 2021/07/15 08:00:27 UTC

[GitHub] [pulsar] eolivelli opened a new pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

eolivelli opened a new pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322


   The Sink should be able to manage the result of GenericRecord.getNativeObject().
   In order to do this Apache AVRO must be loaded from the same classloader that is loading Apache Pulsar Runtime.
   
   The same problem applies in the case of a JsonNode returned by getNativeObject();
   
   *Modifications*
   - Add AVRO to the list of classes (like slf4j) to be loaded from the Pulsar runtime.
   - Enhance the existing integration tests, that tested about the Schema definition, but it didn't actually try to "use" the GenericRecord object
   
   This is only a proof-of-concept PR, in order to support the discussion.
   


-- 
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] nlu90 commented on a change in pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

Posted by GitBox <gi...@apache.org>.
nlu90 commented on a change in pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322#discussion_r670737934



##########
File path: pulsar-functions/runtime-all/src/test/java/org/apache/pulsar/functions/instance/JavaInstanceDepsTest.java
##########
@@ -60,11 +60,14 @@ public void testInstanceJarDeps() throws IOException {
             if (e == null)
                 break;
             String name = e.getName();
-            if (name.endsWith(".class") && !name.startsWith("META-INF")) {
+            if (name.endsWith(".class") && !name.startsWith("META-INF") && !name.equals("module-info.class")) {
                 // The only classes in the java-instance.jar should be org.apache.pulsar, slf4j, and log4j classes

Review comment:
       the comments also need to be updated




-- 
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] Anonymitaet commented on pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322#issuecomment-881094634


   Thanks for your contribution. For this PR, do we need to update docs?
   
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc info in future PR descriptions? Thanks) 


-- 
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] eolivelli commented on pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322#issuecomment-882403140


   @nlu90 can you please take a final look ?
   I would like to fix this problem ASAP in 2.9.0 and commit this patch, this way @merlimat can move forward with his work about the classpath


-- 
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] sijie merged pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322


   


-- 
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] eolivelli commented on a change in pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322#discussion_r671258381



##########
File path: pulsar-functions/runtime-all/src/test/java/org/apache/pulsar/functions/instance/JavaInstanceDepsTest.java
##########
@@ -60,11 +60,14 @@ public void testInstanceJarDeps() throws IOException {
             if (e == null)
                 break;
             String name = e.getName();
-            if (name.endsWith(".class") && !name.startsWith("META-INF")) {
+            if (name.endsWith(".class") && !name.startsWith("META-INF") && !name.equals("module-info.class")) {
                 // The only classes in the java-instance.jar should be org.apache.pulsar, slf4j, and log4j classes

Review comment:
       done, thanks




-- 
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] eolivelli commented on pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322#issuecomment-881344083


   @Anonymitaet when we will find a good solution for this problem I will be happy to help with the docs.
   This PR is part of a bigger issue with have with Pulsar IO and Pulsar Functions
   
   currently this is only a draft


-- 
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] sijie merged pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322


   


-- 
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] sijie merged pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322


   


-- 
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] eolivelli commented on pull request #11322: Pulsar IO: allow Sinks to use native AVRO and JSON

Posted by GitBox <gi...@apache.org>.
eolivelli commented on pull request #11322:
URL: https://github.com/apache/pulsar/pull/11322#issuecomment-882403140


   @nlu90 can you please take a final look ?
   I would like to fix this problem ASAP in 2.9.0 and commit this patch, this way @merlimat can move forward with his work about the classpath


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