I knew it, because yarn depends on proto2 but my lib depends on proto3. The
reason is that proto3 runtime doesn't keep backward compatibility. The
problem can be reproduced if set option java_generate_equals_and_hash =
true with proto2.
I hope msg with proto2 still work with proto3 jar since proto2 has been
widely used in opensource system like yarn, hbase, etc.
在 2015年9月7日星期一 UTC+8下午2:31:04，Feng Xiao写道：
>> I use proto3 to log user event and then run a mapreduce to stat same
>> metrics. But it reports an error:
>> Exception in thread "Thread-2" java.lang.NoSuchMethodError:
>> at java.util.HashMap.hash(HashMap.java:338)
>> at java.util.HashMap.put(HashMap.java:611)
>> The problem is proto3 doesn't keep backward compatibility with proto2.
>> hashLong is no longer exists in generated code with proto3. Now I faced a
>> deed situation that neither proto2 nor proto3 can be loaded when i run a
>> mapreduce job.
> It seems the problem is that your binary depends on both proto2 Java
> runtime and also proto3 Java runtime. One of them will be shadowed by the
> other and you will see such runtime errors. The suggestion is to stick with
> one version through out your project (including all your project's
>> You received this message because you are subscribed to the Google Groups
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> To post to this group, send email to prot...@googlegroups.com
>> Visit this group at http://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.