apache spark - Environment issue in moving from protobuf version 2.4 to 2.5 -


i have generated protobuf code using compiler 2.4. , have created application jar. works fine , can run spark job. jars in classpath of spark relevant protobuf

 mesos-0.18.1-shaded-protobuf.jar,  protobuf-java-2.5.0-spark.jar 

but when use same generated code in sbt unit testing failing

  [info]   org.apache.spark.sparkexception: job aborted due stage           failure: task 0 in stage 2.0 failed 1 times, recent failure:    lost task 0.0 in stage 2.0 (tid 2, localhost):        java.lang.unsupportedoperationexception: supposed overridden subclasses.                                                            [info]  @ com.google.protobuf.generatedmessage.getunknownfields(generatedmessage.java:180) 

from google search found need change protoc compiler version 2.5 , unit testing works fine . application not able run in spark . exception

  java.lang.verifyerror: class xxx.xxx.xx..    overrides final method getunknownfields.()lcom/google/protobuf/unknownfieldset; 

the machine application runs , sbt test runs different

class path in sbt contains

  protobuf-java-2.5.0.jar   protobuf-java-2.5.0-spark.jar    

i had in pom file mesos-0.18.1-shaded-protobuf.jar shows contains google-protobuf version 2.5 .

the questions problem in environment causing issue ?

basically protocol buffers 2.5, several methods went being defined final in protocol buffers library code being in generated code. means code generated protoc 2.4 can not used protocol buffers 2.5 libraries , vice versa


as correctly identified

  java.lang.unsupportedoperationexception: supposed overridden classes.                                                              [info]  @   com.google.protobuf.generatedmessage.getunknownfields(generatedmessage.java:180)  

is message when run code generated protoc 2.4 libraries protocol buffers 2.5


the message

java.lang.verifyerror: class xxx.xxx.xx..  overrides final method getunknownfields.()lcom/google/protobuf/unknownfieldset; 

is message when run code generated protoc 2.5 libraries protocol buffers 2.4.

see: error serialization protobuf


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -