eishay / jvm-serializers

Benchmark comparing serialization libraries on the JVM
http://groups.google.com/group/java-serialization-benchmarking
3.28k stars 560 forks source link

Add wiki for how to run with latest version of protocols will be helpful. #69

Closed fishercoder1534 closed 7 years ago

fishercoder1534 commented 7 years ago

I know this might seem trivial to the authors, but not easy for outsiders like me.

Right now, most of the protocol versions in this master branch are out of date and I saw @vbehar made effort in trying to update the versions in 2013: https://github.com/eishay/jvm-serializers/pull/36.

I forked this awesome repo and tried to update on my own, so far, only protobuf works out (generated a new MediaContentHolder.java class using protobuf 3.1.0, replace the protobuf jar file under lib/ folder and re-run ./run-bench.sh protobuf ).

I tried to do the same thing for the rest of the protocols, e.g. avro, thrift, flatbuffers, etc. But none of them worked out, where I'm blocked is, take avro as an example:

I replaced all three jar files for avro with the latest one: avro-tools-1.8.1.jar, avro-1.8.1.jar and avro-compiler-1.8.1.jar, then try to run make under tpc/ directory, it's always throwing

Compile: pregen/media.proto
pregen/media.proto/serializers/protobuf/media/MediaContentHolder.java:11: error: Image is not abstract and does not override abstract method newBuilderForType(BuilderParent) in GeneratedMessage
    public static final class Image extends
                        ^
pregen/media.proto/serializers/protobuf/media/MediaContentHolder.java:274: error: serializers.protobuf.media.MediaContentHolder.Image.Builder is not abstract and does not override abstract method internalGetFieldAccessorTable() in com.google.protobuf.GeneratedMessage.Builder
        public static final class Builder extends
                            ^
pregen/media.proto/serializers/protobuf/media/MediaContentHolder.java:535: error: Media is not abstract and does not override abstract method newBuilderForType(BuilderParent) in GeneratedMessage
    public static final class Media extends
                        ^
pregen/media.proto/serializers/protobuf/media/MediaContentHolder.java:892: error: serializers.protobuf.media.MediaContentHolder.Media.Builder is not abstract and does not override abstract method internalGetFieldAccessorTable() in com.google.protobuf.GeneratedMessage.Builder
        public static final class Builder extends
                            ^
pregen/media.proto/serializers/protobuf/media/MediaContentHolder.java:1338: error: MediaContent is not abstract and does not override abstract method newBuilderForType(BuilderParent) in GeneratedMessage
    public static final class MediaContent extends
                        ^
pregen/media.proto/serializers/protobuf/media/MediaContentHolder.java:1502: error: serializers.protobuf.media.MediaContentHolder.MediaContent.Builder is not abstract and does not override abstract method internalGetFieldAccessorTable() in com.google.protobuf.GeneratedMessage.Builder
        public static final class Builder extends

The above stacktrace comes from: I tried latest version of avro with old version (version in master branch currently) of protobuf, then I thought it's complaining about the protobuf, then I used the newly generated protobuf java class: MediaContentHolder.java with 3.1.0 protobuf jar, it's not compiling either and with the following stacktrace:

# Compile: pregen/media.proto
pregen/media.proto/serializers/protobuf/media/MediaContentHolder.java:828: error: cannot find symbol
                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
                                               ^
  symbol:   class OneofDescriptor
  location: class Descriptors
pregen/media.proto/serializers/protobuf/media/MediaContentHolder.java:2669: error: cannot find symbol
                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
                                               ^
  symbol:   class OneofDescriptor
  location: class Descriptors
pregen/media.proto/serializers/protobuf/media/MediaContentHolder.java:4131: error: cannot find symbol
                com.google.protobuf.Descriptors.OneofDescriptor oneof) {
                                               ^
  symbol:   class OneofDescriptor
  location: class Descriptors
3 errors

Looks like very obvious error, but I'm not able to figure it out. Any steps I'm missing? Any idea would be greatly appreciated!

The same applies to my other tries to benchmark other protocols of their latest version.

So, any help or instructions on how to update the protocols to run with their latest versions would be greatly appreciated! I think it will also be helpful for other people to use this project. So far, this is the best project I found on the Internet to benchmark Java serialization performance, if all authors/contributors are busy at the moment, I'd be more than happy to volunteer to maintain the wiki and keep the code up to date.

Cheers!

Thanks!

fishercoder1534 commented 7 years ago

Anyone could please take a look and give me any guidance please? Your help/time will be greatly appreciated!

cakoose commented 7 years ago

I just did the Avro upgrade.

The problem was that avro-tools-1.8.1.jar bundles some of the Protobuf class files (ugh). The bundled class files aren't compatible with the ones our generated Protobuf code relies on.

We're pretty fast and loose with what's on the classpath; we just include "lib/*.jar". It would be nice to be more precise with dependencies at some point.

But as a quick fix, I put avro-tools-1.8.1.jar in "lib/extra/", so it won't get picked up by default. The Makefile now specifically references that JAR only when we need to run the Avro code generator.

On Fri, Dec 2, 2016 at 3:59 PM, Steve Sun notifications@github.com wrote:

Anyone could please take a look and give me any guidance please? Your help/time will be greatly appreciated!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eishay/jvm-serializers/issues/69#issuecomment-264594845, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOpda1hb7x_VIKH0nauTEBNTtl6Zw7zks5rELDJgaJpZM4LB9NO .

fishercoder1534 commented 7 years ago

Great! Thanks a lot @cakoose

With this upgrade, I just did an upgrade of Thrift to the latest version: 0.9.3: https://github.com/eishay/jvm-serializers/pull/70

Could you please take a look and approve please?

Let me know if you have any questions regarding this pull request. Thanks a lot!