-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Description
For aarch64 platform, I have built "YCSB" latest version 0.17.0 from source.
Steps
Following STEPS were used for the building and installation:
$ git clone https://github.com/brianfrankcooper/YCSB.git
$ cd YCSB && git checkout 0.17.0
$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-arm64/ && export PATH=$JAVA_HOME/bin:$PATH
$ mvn clean package
Outcome
a. Build and test fails on the target "RocksDB Java Binding" with the following error:
Tests in error:
insertAndDelete(site.ycsb.db.rocksdb.RocksDBClientTest): /tmp/librocksdbjni12823218884003910883.so: /tmp/librocksdbjni12823218884003910883.so: cannot open shared object file: No such file or directory (Possible cause: can't load AMD 64-bit .so on a AARCH64-bit platform)
RocksDBjni version 5.11.3 is used in the YCSB version 0.17.0, which does not release "librocksdbjni-linux-aarch64.so" in the jars available at the maven central.
On further investigation, I discovered that RocksDBjni version 6.2.2 primarily released "librocksdbjni-linux-aarch64.so" in the jar at maven central, as can be verified below:
$ wget https://repo.maven.apache.org/maven2/org/rocksdb/rocksdbjni/6.2.2/rocksdbjni-6.2.2.jar
$ jar -xvf rocksdbjni-6.2.2.jar | grep lib
inflated: librocksdbjni-linux32.so
inflated: librocksdbjni-linux64.so
inflated: librocksdbjni-osx.jnilib
inflated: librocksdbjni-linux-ppc64le.so
inflated: librocksdbjni-linux-aarch64.so
inflated: librocksdbjni-win64.dll
$ file librocksdbjni-linux-aarch64.so
librocksdbjni-linux-aarch64.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=8d2917ca0e73a6dff45c303bf2ad05751c5ec2ef, not stripped
However, updating the rocksdb version to 6.2.2 in the pom.xml in YCSB still fails the target "RocksDB Java Binding" with the same error as shared above. It still tries to load AMD 64-bit .so on my aarch64 platform.
And the issue gets resolved in rocksdbjni version 6.3.6. Bumping the rocksdb version to 6.3.6 in YCSB pom.xml resolves this issue, and tests specific to target "RocksDB Java Binding" passes.
b. Other two targets "Solr Binding" and "Solr 6 Binding" fails commonly on Linux/AMD64 as well as Linux/ARM64 platforms with the common issue of downloading corrupted Restlet jars, as can be seen below:
error reading org.restlet-2.3.0.jar; zip END header not founderror reading org.restlet.ext.servlet-2.3.0.jar; zip END header not found
I commented solr and solr6 dependencies inside distribution/pom.xml and ran mvn clean package -pl '!solr, !solr6'. Build and test executed successfully for all other bindings.