-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build RocksDB JNI cross-platform fat jar #318
Conversation
…lds in the same Jar file. Cross build RocksDB for linux32 and linux64 using Vagrant. Build a cross-platform fat jar that contains osx, linux32, and linux64 RocksDB static builds.
…using clock skew and confusig make.
… jars back to host system.
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Thanks a lot Chris for these changes. These are awesome :) One comment:
|
The cross build must be run from a Mac. The reason for this is that there is no public virtual box image for Macs because OS X is proprietary. |
Also, can you comment on this:
|
Not sure how JARs are versioned. @yhchiang, can you please comment if you have any idea on how JARs are versioned currently. |
It appears JARs are not currently versioned. I can add that, but I need to know how RocksDB itself handles versions. Is there a file somewhere with a version number? I couldn't find one. |
In RocksDB C++, version is defined in include/rocksdb/version.h, we might need some way to port this number to Java side. https://github.com/facebook/rocksdb/blob/master/include/rocksdb/version.h#L8-L9 |
I have successfully built and published all JARs to a staging directory in Sonatype with:
|
@criccomini @ankgup87 @yhchiang I think one remaining issue is the inconsitency of JavaDoc within the source. I would propose to work on getting JavaDoc consistent and to update each public interface with versioning information in JavaDoc. update: #334 I solved there the main issues with the current version of JavaDoc |
cd java/crossbuild && vagrant destroy -f && vagrant up linux32 && vagrant halt linux32 && vagrant up linux64 && vagrant halt linux64 | ||
cd java;jar -cf $(ROCKSDB_JAR_ALL) org/rocksdb/*.class org/rocksdb/util/*.class HISTORY*.md librocksdbjni-*.so librocksdbjni-*.jnilib | ||
|
||
rocksdbjavastaticpublish: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this depend on rocksdbjavastaticrelease?
This looks great! Just one small comment. |
@criccomini looks like there are some merge conflicts. Can you please resolve them and update the pull request? |
Fixed Make publish target to depend on release. Did a clean checkout and build. Appears to work. Waiting on @naveenatceg for a final round of tests. Once that's done, I'll let you know it's ready to merge. |
Thanks @criccomini. Please keep me posted in this :) |
Thanks a lot Chris. Please update the ticket regarding tests. Diff looks good and after the tests succeed, we can merge this diff. |
Hey all, we've finished running tests with the jar using Apache Samza on both Mac OSX and RHEL 6.4. Works on both. I believe we're ready to commit. When may I publish the 3.6 release to Maven? It's staged right now, but we're building off of master. |
Build RocksDB JNI cross-platform fat jar
Hi Chris, Thanks for testing out these changes. I don't have any issues in publishing a jar on maven built from master. @yhchiang @igorcanadi can you please weigh in here. Merging this pull request. |
I should be releasing 3.6 internally today, but will wait a couple of days to release 3.6 publicly in case we detect some regressions in internal tests. |
@igorcanadi awesome. In that case, I think we can wait until the official 3.6 tag to do the Maven publication. This way the Java 3.6 binary will be the same as the 3.6 release. Do you think it's likely that this will be done by EOW? |
Out of interest do the Jars include the relevant metadata in META-INF/ ? |
@criccomini I would say mid-next week |
The Jars include a META-INF with some really basic stuff (Java version that was used seems to be about it). |
Changes Unknown when pulling 1e5a528 on criccomini:master into * on facebook:master*. |
Merge RocksDB 8.9.1 to master
Initial pass at a RocksDB JNI cross-platform fat jar.
Building a cross-platform JAR requires:
Once you have these items, run this make command from RocksDB's root source directory:
This command will build RocksDB natively on OSX, and will then spin up two Vagrant Virtualbox Ubuntu images to build RocksDB for both 32-bit and 64-bit Linux.
You can find all native binaries and JARs in the java directory upon completion: