-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
617 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
.idea | ||
*.iml | ||
|
||
cmake-build*/ | ||
build*/ | ||
rocksdbjni-bin | ||
|
||
target | ||
java/src/main/resources/lib* | ||
slice.cc | ||
|
||
/rocksdb/ | ||
slice.cc | ||
merge_operator.cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
ROCKSDB_VERSION ?= 5.17.2 | ||
|
||
.PHONY: $(MAKECMDGOALS) | ||
|
||
# Crossbuild: | ||
|
||
all: clean build-linux32 build-linux64 build-osx | ||
|
||
prepare-rocksdb: | ||
git clone https://github.com/facebook/rocksdb | ||
cd rocksdb; git checkout v${ROCKSDB_VERSION} | ||
|
||
clean: | ||
# docker rm -f rocksdb_linux_x86-be || true | ||
# docker rm -f rocksdb_linux_x64-be || true | ||
rm -rf build-* | ||
|
||
build-linux32: | ||
./scripts/build-linux-docker.sh 32 | ||
|
||
build-linux64: | ||
./scripts/build-linux-docker.sh 64 | ||
|
||
build-osx: | ||
./scripts/build.sh osx | ||
|
||
# Only for windows: | ||
|
||
win-prepare: prepare-rocksdb | ||
choco install jdk8 maven visualstudio2017community intellijidea-community vscode | ||
|
||
build-win: | ||
.\scripts\build-win.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
|
||
## Build in PPC64LE | ||
|
||
Use Ubuntu 16.04 (e.g. AWS instance 4 cores, 16GB RAM, 40GB storage for build). | ||
Install git if not installed. If docker is installed, it might need to be removed. | ||
|
||
Setup ppc64le docker machine ([source](https://developer.ibm.com/linuxonpower/2017/06/08/build-test-ppc64le-docker-images-intel/)): | ||
|
||
wget http://ftp.unicamp.br/pub/ppc64el/boot2docker/install.sh && chmod +x ./install.sh && ./install.sh -s | ||
docker-machine create -d qemu \ | ||
--qemu-boot2docker-url=/home/ubuntu/.docker/machine/boot2docker.iso \ | ||
--qemu-memory 8192 \ | ||
--qemu-cache-mode none \ | ||
--qemu-arch ppc64le \ | ||
vm-ppc64le | ||
|
||
Regenerate certs as suggested if it did not work at once. | ||
|
||
Prepare docker machine to run rocksdbjni docker image for ppc64le build: | ||
|
||
eval $(docker-machine env vm-ppc64le) | ||
git clone https://github.com/azagrebin/flink-rocksdb-plugins | ||
cd flink-rocksdb-plugins | ||
git checkout <release tag> | ||
docker-machine ssh vm-ppc64le mkdir -p `pwd` | ||
docker-machine scp -r . vm-ppc64le:`pwd` | ||
|
||
### Build in Windows | ||
|
||
Use Windows 64 bit machine (e.g. base AWS Windows instance: 4 cores, 16GB RAM, 40GB storage for build). | ||
|
||
Open cmd, install [chocolatey](https://chocolatey.org/install) and run: | ||
|
||
choco install make git.install | ||
git clone https://github.com/azagrebin/flink-rocksdb-plugins | ||
cd flink-rocksdb-plugins | ||
git checkout <release tag> | ||
ROCKSDB_VERSION=5.17.2 make win-prepare &:: install useful software and clone rocksdb, might take time | ||
make build-win | ||
|
||
### Cross-platform build in Mac OSX | ||
|
||
Clone rocksdb: | ||
|
||
ROCKSDB_VERSION=5.17.2 make prepare-rocksdb | ||
|
||
Install docker and run: | ||
|
||
cp <windows library location>/liblibfrocksdbpluginsjni-linux.dll java/src/main/resources/. | ||
cp <ppc64le library location>/liblibfrocksdbpluginsjni-linux-ppc64le.so java/src/main/resources/. | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.