[jira] [Comment Edited] (AVRO-2177) avro-protobuf not honouring java_multiple_files option

2018-05-09 Thread Mahesh (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16468542#comment-16468542
 ] 

Mahesh edited comment on AVRO-2177 at 5/9/18 8:25 AM:
--

Have a working fix for above and happy to submit a patch.

Cheers


was (Author: mahesh.m...@deliveroo.co.uk):
Have a working fix for above and happy to submit a patch for above.

Cheers

> avro-protobuf not honouring java_multiple_files option
> --
>
> Key: AVRO-2177
> URL: https://issues.apache.org/jira/browse/AVRO-2177
> Project: Avro
>  Issue Type: Bug
>  Components: java
>Affects Versions: 1.8.2
>Reporter: Mahesh
>Priority: Major
>
> Using avro-protobuf for google protobuf timestamp models fails to extract 
> schema due to invalid namespace resolution.
>   
>  Proto model for timestamp has following options defined. 
> {code:java}
> option java_outer_classname = "TimestampProto";
> option java_multiple_files = true; 
> {code}
>  
>  That would mean that the generated code for Timestamp will be at 
> "com.google.protobuf.Timestamp" rather than 
> "com.google.protobuf.TimestampProto$Timestamp". 
>   
>  However, when I try to derive an avro schema from a proto model using google 
> timestamp, avro-protobuf is not honouring the java_multiple_files option and 
> tries to look for timestamp class at 
> "com.google.protobuf.TimestampProto$Timestamp"
>   
> {code:java}
> Caused by: java.lang.ClassNotFoundException: Failed to load 
> classcom.google.protobuf.TimestampProto$Timestamp
>  at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:60)
>  at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:36)
>  at 
> com.deliveroo.data.util.proto.avro.ProtobufData.newRecord(ProtobufData.java:137){code}
>  
>  "getNamespace" of org.apache.avro.protobuf.ProtobufData ins't honouring 
> multiple files option there by breaking models that import google proto 
> definitions. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2177) avro-protobuf not honouring java_multiple_files option

2018-05-09 Thread Mahesh (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16468542#comment-16468542
 ] 

Mahesh commented on AVRO-2177:
--

Have a working fix for above and happy to submit a patch for above.

Cheers

> avro-protobuf not honouring java_multiple_files option
> --
>
> Key: AVRO-2177
> URL: https://issues.apache.org/jira/browse/AVRO-2177
> Project: Avro
>  Issue Type: Bug
>  Components: java
>Affects Versions: 1.8.2
>Reporter: Mahesh
>Priority: Major
>
> Using avro-protobuf for google protobuf timestamp models fails to extract 
> schema due to invalid namespace resolution.
>   
>  Proto model for timestamp has following options defined. 
> {code:java}
> option java_outer_classname = "TimestampProto";
> option java_multiple_files = true; 
> {code}
>  
>  That would mean that the generated code for Timestamp will be at 
> "com.google.protobuf.Timestamp" rather than 
> "com.google.protobuf.TimestampProto$Timestamp". 
>   
>  However, when I try to derive an avro schema from a proto model using google 
> timestamp, avro-protobuf is not honouring the java_multiple_files option and 
> tries to look for timestamp class at 
> "com.google.protobuf.TimestampProto$Timestamp"
>   
> {code:java}
> Caused by: java.lang.ClassNotFoundException: Failed to load 
> classcom.google.protobuf.TimestampProto$Timestamp
>  at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:60)
>  at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:36)
>  at 
> com.deliveroo.data.util.proto.avro.ProtobufData.newRecord(ProtobufData.java:137){code}
>  
>  "getNamespace" of org.apache.avro.protobuf.ProtobufData ins't honouring 
> multiple files option there by breaking models that import google proto 
> definitions. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (AVRO-2177) avro-protobuf not honouring java_multiple_files option

2018-05-09 Thread Mahesh (JIRA)

 [ 
https://issues.apache.org/jira/browse/AVRO-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mahesh updated AVRO-2177:
-
Description: 
Using avro-protobuf for google protobuf timestamp models fails to extract 
schema due to invalid namespace resolution.
  
 Proto model for timestamp has following options defined. 


{code:java}
option java_outer_classname = "TimestampProto";
option java_multiple_files = true; 
{code}
 
 That would mean that the generated code for Timestamp will be at 
"com.google.protobuf.Timestamp" rather than 
"com.google.protobuf.TimestampProto$Timestamp". 
  
 However, when I try to derive an avro schema from a proto model using google 
timestamp, avro-protobuf is not honouring the java_multiple_files option and 
tries to look for timestamp class at 
"com.google.protobuf.TimestampProto$Timestamp"
  
{code:java}
Caused by: java.lang.ClassNotFoundException: Failed to load 
classcom.google.protobuf.TimestampProto$Timestamp
 at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:60)
 at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:36)
 at 
com.deliveroo.data.util.proto.avro.ProtobufData.newRecord(ProtobufData.java:137){code}
 
 "getNamespace" of org.apache.avro.protobuf.ProtobufData ins't honouring 
multiple files option there by breaking models that import google proto 
definitions. 

  was:
Using avro-protobuf for google protobuf timestamp models fails to extract 
schema due to invalid namespace resolution.
 
Proto model for timestamp has following options defined. 
 
 
{code:java}
option java_outer_classname = "TimestampProto";
option java_multiple_files = true; 
{code}
 
That would mean that the generated code for Timestamp will be at 
"com.google.protobuf.Timestamp" rather than 
"com.google.protobuf.TimestampProto$Timestamp". 
 
However, when I try to derive an avro schema from a proto model using google 
timestamp, avro-protobuf is not honouring the java_multiple_files option and 
tries to look for timestamp class at 
"com.google.protobuf.TimestampProto$Timestamp"
 
{code:java}
Caused by: java.lang.ClassNotFoundException: Failed to load 
classcom.google.protobuf.TimestampProto$Timestamp
 at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:60)
 at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:36)
 at 
com.deliveroo.data.util.proto.avro.ProtobufData.newRecord(ProtobufData.java:137){code}
 
"getNamespace" of org.apache.avro.protobuf.ProtobufData ins't honouring 
multiple files option there by breaking models that import google proto 
definitions. 


> avro-protobuf not honouring java_multiple_files option
> --
>
> Key: AVRO-2177
> URL: https://issues.apache.org/jira/browse/AVRO-2177
> Project: Avro
>  Issue Type: Bug
>  Components: java
>Affects Versions: 1.8.2
>Reporter: Mahesh
>Priority: Major
>
> Using avro-protobuf for google protobuf timestamp models fails to extract 
> schema due to invalid namespace resolution.
>   
>  Proto model for timestamp has following options defined. 
> {code:java}
> option java_outer_classname = "TimestampProto";
> option java_multiple_files = true; 
> {code}
>  
>  That would mean that the generated code for Timestamp will be at 
> "com.google.protobuf.Timestamp" rather than 
> "com.google.protobuf.TimestampProto$Timestamp". 
>   
>  However, when I try to derive an avro schema from a proto model using google 
> timestamp, avro-protobuf is not honouring the java_multiple_files option and 
> tries to look for timestamp class at 
> "com.google.protobuf.TimestampProto$Timestamp"
>   
> {code:java}
> Caused by: java.lang.ClassNotFoundException: Failed to load 
> classcom.google.protobuf.TimestampProto$Timestamp
>  at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:60)
>  at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:36)
>  at 
> com.deliveroo.data.util.proto.avro.ProtobufData.newRecord(ProtobufData.java:137){code}
>  
>  "getNamespace" of org.apache.avro.protobuf.ProtobufData ins't honouring 
> multiple files option there by breaking models that import google proto 
> definitions. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (AVRO-2177) avro-protobuf not honouring java_multiple_files option

2018-05-09 Thread Mahesh (JIRA)
Mahesh created AVRO-2177:


 Summary: avro-protobuf not honouring java_multiple_files option
 Key: AVRO-2177
 URL: https://issues.apache.org/jira/browse/AVRO-2177
 Project: Avro
  Issue Type: Bug
  Components: java
Affects Versions: 1.8.2
Reporter: Mahesh


Using avro-protobuf for google protobuf timestamp models fails to extract 
schema due to invalid namespace resolution.
 
Proto model for timestamp has following options defined. 
 
 
{code:java}
option java_outer_classname = "TimestampProto";
option java_multiple_files = true; 
{code}
 
That would mean that the generated code for Timestamp will be at 
"com.google.protobuf.Timestamp" rather than 
"com.google.protobuf.TimestampProto$Timestamp". 
 
However, when I try to derive an avro schema from a proto model using google 
timestamp, avro-protobuf is not honouring the java_multiple_files option and 
tries to look for timestamp class at 
"com.google.protobuf.TimestampProto$Timestamp"
 
{code:java}
Caused by: java.lang.ClassNotFoundException: Failed to load 
classcom.google.protobuf.TimestampProto$Timestamp
 at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:60)
 at org.apache.avro.util.ClassUtils.forName(ClassUtils.java:36)
 at 
com.deliveroo.data.util.proto.avro.ProtobufData.newRecord(ProtobufData.java:137){code}
 
"getNamespace" of org.apache.avro.protobuf.ProtobufData ins't honouring 
multiple files option there by breaking models that import google proto 
definitions. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)