Moved Java main classes into src/main/java

main
Adam Retter 10 years ago
parent 98cb501bc0
commit 353db6daef
  1. 39
      Makefile
  2. 28
      java/Makefile
  3. 4
      java/crossbuild/build-linux-centos.sh
  4. 4
      java/crossbuild/build-linux.sh
  5. 0
      java/src/main/java/org/rocksdb/AbstractComparator.java
  6. 0
      java/src/main/java/org/rocksdb/AbstractRocksIterator.java
  7. 0
      java/src/main/java/org/rocksdb/AbstractSlice.java
  8. 0
      java/src/main/java/org/rocksdb/AbstractWriteBatch.java
  9. 0
      java/src/main/java/org/rocksdb/BackupInfo.java
  10. 0
      java/src/main/java/org/rocksdb/BackupableDB.java
  11. 0
      java/src/main/java/org/rocksdb/BackupableDBOptions.java
  12. 0
      java/src/main/java/org/rocksdb/BlockBasedTableConfig.java
  13. 0
      java/src/main/java/org/rocksdb/BloomFilter.java
  14. 0
      java/src/main/java/org/rocksdb/BuiltinComparator.java
  15. 0
      java/src/main/java/org/rocksdb/Checkpoint.java
  16. 0
      java/src/main/java/org/rocksdb/ChecksumType.java
  17. 0
      java/src/main/java/org/rocksdb/ColumnFamilyDescriptor.java
  18. 0
      java/src/main/java/org/rocksdb/ColumnFamilyHandle.java
  19. 0
      java/src/main/java/org/rocksdb/ColumnFamilyOptions.java
  20. 0
      java/src/main/java/org/rocksdb/ColumnFamilyOptionsInterface.java
  21. 0
      java/src/main/java/org/rocksdb/CompactionStyle.java
  22. 0
      java/src/main/java/org/rocksdb/Comparator.java
  23. 0
      java/src/main/java/org/rocksdb/ComparatorOptions.java
  24. 0
      java/src/main/java/org/rocksdb/CompressionType.java
  25. 0
      java/src/main/java/org/rocksdb/DBOptions.java
  26. 0
      java/src/main/java/org/rocksdb/DBOptionsInterface.java
  27. 0
      java/src/main/java/org/rocksdb/DirectComparator.java
  28. 0
      java/src/main/java/org/rocksdb/DirectSlice.java
  29. 0
      java/src/main/java/org/rocksdb/EncodingType.java
  30. 0
      java/src/main/java/org/rocksdb/Filter.java
  31. 0
      java/src/main/java/org/rocksdb/FlushOptions.java
  32. 0
      java/src/main/java/org/rocksdb/GenericRateLimiterConfig.java
  33. 0
      java/src/main/java/org/rocksdb/HashLinkedListMemTableConfig.java
  34. 0
      java/src/main/java/org/rocksdb/HashSkipListMemTableConfig.java
  35. 0
      java/src/main/java/org/rocksdb/HistogramData.java
  36. 0
      java/src/main/java/org/rocksdb/HistogramType.java
  37. 0
      java/src/main/java/org/rocksdb/IndexType.java
  38. 0
      java/src/main/java/org/rocksdb/InfoLogLevel.java
  39. 0
      java/src/main/java/org/rocksdb/MemTableConfig.java
  40. 0
      java/src/main/java/org/rocksdb/MergeOperator.java
  41. 0
      java/src/main/java/org/rocksdb/NativeLibraryLoader.java
  42. 0
      java/src/main/java/org/rocksdb/Options.java
  43. 0
      java/src/main/java/org/rocksdb/PlainTableConfig.java
  44. 0
      java/src/main/java/org/rocksdb/RateLimiterConfig.java
  45. 0
      java/src/main/java/org/rocksdb/ReadOptions.java
  46. 0
      java/src/main/java/org/rocksdb/RestoreBackupableDB.java
  47. 0
      java/src/main/java/org/rocksdb/RestoreOptions.java
  48. 0
      java/src/main/java/org/rocksdb/RocksDB.java
  49. 0
      java/src/main/java/org/rocksdb/RocksDBException.java
  50. 0
      java/src/main/java/org/rocksdb/RocksEnv.java
  51. 0
      java/src/main/java/org/rocksdb/RocksIterator.java
  52. 0
      java/src/main/java/org/rocksdb/RocksIteratorInterface.java
  53. 0
      java/src/main/java/org/rocksdb/RocksObject.java
  54. 0
      java/src/main/java/org/rocksdb/SkipListMemTableConfig.java
  55. 0
      java/src/main/java/org/rocksdb/Slice.java
  56. 0
      java/src/main/java/org/rocksdb/Snapshot.java
  57. 0
      java/src/main/java/org/rocksdb/Statistics.java
  58. 0
      java/src/main/java/org/rocksdb/StatisticsCollector.java
  59. 0
      java/src/main/java/org/rocksdb/StatisticsCollectorCallback.java
  60. 0
      java/src/main/java/org/rocksdb/StatsCollectorInput.java
  61. 0
      java/src/main/java/org/rocksdb/StringAppendOperator.java
  62. 0
      java/src/main/java/org/rocksdb/TableFormatConfig.java
  63. 0
      java/src/main/java/org/rocksdb/TickerType.java
  64. 0
      java/src/main/java/org/rocksdb/TransactionLogIterator.java
  65. 0
      java/src/main/java/org/rocksdb/TtlDB.java
  66. 0
      java/src/main/java/org/rocksdb/VectorMemTableConfig.java
  67. 0
      java/src/main/java/org/rocksdb/WBWIRocksIterator.java
  68. 0
      java/src/main/java/org/rocksdb/WriteBatch.java
  69. 0
      java/src/main/java/org/rocksdb/WriteBatchInterface.java
  70. 0
      java/src/main/java/org/rocksdb/WriteBatchWithIndex.java
  71. 0
      java/src/main/java/org/rocksdb/WriteOptions.java
  72. 0
      java/src/main/java/org/rocksdb/util/Environment.java
  73. 0
      java/src/main/java/org/rocksdb/util/SizeUnit.java

@ -631,35 +631,40 @@ libsnappy.a:
rocksdbjavastatic: libz.a libbz2.a libsnappy.a rocksdbjavastatic: libz.a libbz2.a libsnappy.a
OPT="-fPIC -DNDEBUG -O2" $(MAKE) $(LIBRARY) -j OPT="-fPIC -DNDEBUG -O2" $(MAKE) $(LIBRARY) -j
cd java;$(MAKE) javalib; cd java;$(MAKE) javalib;
rm -f ./java/$(ROCKSDBJNILIB) rm -f ./java/target/$(ROCKSDBJNILIB)
$(CXX) $(CXXFLAGS) -I./java/. $(JAVA_INCLUDE) -shared -fPIC -o ./java/$(ROCKSDBJNILIB) $(JNI_NATIVE_SOURCES) $(LIBOBJECTS) $(COVERAGEFLAGS) libz.a libbz2.a libsnappy.a $(CXX) $(CXXFLAGS) -I./java/. $(JAVA_INCLUDE) -shared -fPIC -o ./java/target/$(ROCKSDBJNILIB) $(JNI_NATIVE_SOURCES) $(LIBOBJECTS) $(COVERAGEFLAGS) libz.a libbz2.a libsnappy.a
cd java;strip -S -x $(ROCKSDBJNILIB) cd java/target;strip -S -x $(ROCKSDBJNILIB)
cd java;jar -cf $(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class HISTORY*.md $(ROCKSDBJNILIB) cd java;jar -cf target/$(ROCKSDB_JAR) HISTORY*.md
cd java/javadoc;jar -cf ../$(ROCKSDB_JAVADOCS_JAR) * cd java/target;jar -uf $(ROCKSDB_JAR) $(ROCKSDBJNILIB)
cd java;jar -cf $(ROCKSDB_SOURCES_JAR) org cd java/target/classes;jar -uf ../$(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class
cd java/target/apidocs;jar -cf ../$(ROCKSDB_JAVADOCS_JAR) *
cd java/src/main/java;jar -cf ../../../target/$(ROCKSDB_SOURCES_JAR) org
rocksdbjavastaticrelease: rocksdbjavastatic rocksdbjavastaticrelease: rocksdbjavastatic
cd java/crossbuild && vagrant destroy -f && vagrant up linux32 && vagrant halt linux32 && vagrant up linux64 && vagrant halt linux64 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 cd java;jar -cf target/$(ROCKSDB_JAR_ALL) HISTORY*.md
cd java/target;jar -uf $(ROCKSDB_JAR_ALL) librocksdbjni-*.so librocksdbjni-*.jnilib
cd java/target/classes;jar -uf ../$(ROCKSDB_JAR_ALL) org/rocksdb/*.class org/rocksdb/util/*.class
rocksdbjavastaticpublish: rocksdbjavastaticrelease rocksdbjavastaticpublish: rocksdbjavastaticrelease
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-javadoc.jar -Dclassifier=javadoc mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/target/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-javadoc.jar -Dclassifier=javadoc
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-sources.jar -Dclassifier=sources mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/target/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-sources.jar -Dclassifier=sources
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-linux64.jar -Dclassifier=linux64 mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/target/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-linux64.jar -Dclassifier=linux64
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-linux32.jar -Dclassifier=linux32 mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/target/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-linux32.jar -Dclassifier=linux32
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-osx.jar -Dclassifier=osx mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/target/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-osx.jar -Dclassifier=osx
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH).jar mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=sonatype-nexus-staging -DpomFile=java/rocksjni.pom -Dfile=java/target/rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH).jar
rocksdbjava: rocksdbjava:
OPT="-fPIC -DNDEBUG -O2" $(MAKE) $(LIBRARY) -j32 OPT="-fPIC -DNDEBUG -O2" $(MAKE) $(LIBRARY) -j32
cd java;$(MAKE) javalib; cd java;$(MAKE) javalib;
rm -f ./java/$(ROCKSDBJNILIB) rm -f ./java/target/$(ROCKSDBJNILIB)
$(CXX) $(CXXFLAGS) -I./java/. $(JAVA_INCLUDE) -shared -fPIC -o ./java/$(ROCKSDBJNILIB) $(JNI_NATIVE_SOURCES) $(LIBOBJECTS) $(JAVA_LDFLAGS) $(COVERAGEFLAGS) $(CXX) $(CXXFLAGS) -I./java/. $(JAVA_INCLUDE) -shared -fPIC -o ./java/target/$(ROCKSDBJNILIB) $(JNI_NATIVE_SOURCES) $(LIBOBJECTS) $(JAVA_LDFLAGS) $(COVERAGEFLAGS)
cd java;jar -cf $(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class HISTORY*.md $(ROCKSDBJNILIB) cd java;jar -cf target/$(ROCKSDB_JAR) HISTORY*.md
cd java/target;jar -uf $(ROCKSDB_JAR) $(ROCKSDBJNILIB)
cd java/target/classes;jar -uf ../$(ROCKSDB_JAR) org/rocksdb/*.class org/rocksdb/util/*.class
jclean: jclean:
cd java;$(MAKE) clean; cd java;$(MAKE) clean;
rm -f $(ROCKSDBJNILIB)
jtest: jtest:
cd java;$(MAKE) sample;$(MAKE) test; cd java;$(MAKE) sample;$(MAKE) test;

@ -92,11 +92,12 @@ JAVA_TESTS = org.rocksdb.BackupableDBOptionsTest\
org.rocksdb.WriteOptionsTest\ org.rocksdb.WriteOptionsTest\
org.rocksdb.WriteBatchWithIndexTest org.rocksdb.WriteBatchWithIndexTest
MAIN_SRC = src/main/java
TEST_SRC = src/test/java TEST_SRC = src/test/java
OUTPUT = target OUTPUT = target
# TODO update after moving main classes MAIN_CLASSES = $(OUTPUT)/classes
MAIN_CLASSES = .
TEST_CLASSES = $(OUTPUT)/test-classes TEST_CLASSES = $(OUTPUT)/test-classes
JAVADOC = $(OUTPUT)/apidocs
JAVA_TEST_LIBDIR = ./test-libs/ JAVA_TEST_LIBDIR = ./test-libs/
JAVA_JUNIT_JAR = $(JAVA_TEST_LIBDIR)junit-4.12-beta-2.jar JAVA_JUNIT_JAR = $(JAVA_TEST_LIBDIR)junit-4.12-beta-2.jar
@ -107,25 +108,25 @@ JAVA_ASSERTJ_JAR = $(JAVA_TEST_LIBDIR)assertj-core-1.7.0.jar
JAVA_TESTCLASSPATH = $(JAVA_JUNIT_JAR):$(JAVA_HAMCR_JAR):$(JAVA_MOCKITO_JAR):$(JAVA_CGLIB_JAR):$(JAVA_ASSERTJ_JAR):.:./* JAVA_TESTCLASSPATH = $(JAVA_JUNIT_JAR):$(JAVA_HAMCR_JAR):$(JAVA_MOCKITO_JAR):$(JAVA_CGLIB_JAR):$(JAVA_ASSERTJ_JAR):.:./*
clean: clean:
-find . -name "*.class" -exec rm {} \;
rm -rf include/* rm -rf include/*
rm -rf javadoc/*
rm -rf test-libs/ rm -rf test-libs/
rm -rf $(OUTPUT) rm -rf $(OUTPUT)
rm -rf librocksdbjni*
rm -f rocksdbjni*
javadocs: javadocs:
mkdir -p javadoc; javadoc -d javadoc -sourcepath . -subpackages org -exclude org.rocksdb.test mkdir -p $(JAVADOC)
javadoc -d $(JAVADOC) -sourcepath $(MAIN_SRC) -subpackages org
javalib: java java_test javadocs javalib: java java_test javadocs
java: java:
javac org/rocksdb/util/*.java org/rocksdb/*.java mkdir -p $(MAIN_CLASSES)
javac -d $(MAIN_CLASSES)\
$(MAIN_SRC)/org/rocksdb/util/*.java\
$(MAIN_SRC)/org/rocksdb/*.java
@cp ../HISTORY.md ./HISTORY-CPP.md @cp ../HISTORY.md ./HISTORY-CPP.md
@rm -f ./HISTORY-CPP.md @rm -f ./HISTORY-CPP.md
javah -d $(NATIVE_INCLUDE) -jni $(NATIVE_JAVA_CLASSES) javah -cp $(MAIN_CLASSES) -d $(NATIVE_INCLUDE) -jni $(NATIVE_JAVA_CLASSES)
sample: java sample: java
javac -cp $(ROCKSDB_JAR) RocksDBSample.java javac -cp $(ROCKSDB_JAR) RocksDBSample.java
@ -151,13 +152,14 @@ resolve_test_deps:
java_test: resolve_test_deps java_test: resolve_test_deps
mkdir -p $(TEST_CLASSES) mkdir -p $(TEST_CLASSES)
javac -cp $(MAIN_CLASSES):$(JAVA_TESTCLASSPATH) -d $(TEST_CLASSES) $(TEST_SRC)/org/rocksdb/*.java javac -cp $(MAIN_CLASSES):$(JAVA_TESTCLASSPATH) -d $(TEST_CLASSES)\
javac -cp $(MAIN_CLASSES):$(JAVA_TESTCLASSPATH) -d $(TEST_CLASSES) $(TEST_SRC)/org/rocksdb/test/*.java $(TEST_SRC)/org/rocksdb/test/*.java\
javac -cp $(MAIN_CLASSES):$(JAVA_TESTCLASSPATH) -d $(TEST_CLASSES) $(TEST_SRC)/org/rocksdb/util/*.java $(TEST_SRC)/org/rocksdb/util/*.java\
$(TEST_SRC)/org/rocksdb/*.java
javah -cp $(MAIN_CLASSES):$(TEST_CLASSES) -d $(NATIVE_INCLUDE) -jni $(NATIVE_JAVA_TEST_CLASSES) javah -cp $(MAIN_CLASSES):$(TEST_CLASSES) -d $(NATIVE_INCLUDE) -jni $(NATIVE_JAVA_TEST_CLASSES)
test: java resolve_test_deps java_test test: java resolve_test_deps java_test
java -ea -Xcheck:jni -Djava.library.path=.:../ -cp "$(MAIN_CLASSES):$(TEST_CLASSES):$(JAVA_TESTCLASSPATH)" org.rocksdb.test.RocksJunitRunner $(JAVA_TESTS) java -ea -Xcheck:jni -Djava.library.path=target -cp "$(MAIN_CLASSES):$(TEST_CLASSES):$(JAVA_TESTCLASSPATH)" org.rocksdb.test.RocksJunitRunner $(JAVA_TESTS)
db_bench: java db_bench: java
javac org/rocksdb/benchmark/*.java javac org/rocksdb/benchmark/*.java

@ -18,6 +18,6 @@ export JAVA_HOME=/usr/lib/jvm/java-1.7.0
cd /rocksdb cd /rocksdb
scl enable devtoolset-1.1 'make jclean clean' scl enable devtoolset-1.1 'make jclean clean'
scl enable devtoolset-1.1 'make -j 4 rocksdbjavastatic' scl enable devtoolset-1.1 'make -j 4 rocksdbjavastatic'
cp /rocksdb/java/librocksdbjni-* /rocksdb-build cp /rocksdb/java/target/librocksdbjni-* /rocksdb-build
cp /rocksdb/java/rocksdbjni-* /rocksdb-build cp /rocksdb/java/target/rocksdbjni-* /rocksdb-build

@ -8,7 +8,7 @@ export JAVA_HOME=$(echo /usr/lib/jvm/java-7-openjdk*)
cd /rocksdb cd /rocksdb
make jclean clean make jclean clean
make -j 4 rocksdbjavastatic make -j 4 rocksdbjavastatic
cp /rocksdb/java/librocksdbjni-* /rocksdb-build cp /rocksdb/java/target/librocksdbjni-* /rocksdb-build
cp /rocksdb/java/rocksdbjni-* /rocksdb-build cp /rocksdb/java/target/rocksdbjni-* /rocksdb-build
sudo shutdown -h now sudo shutdown -h now

Loading…
Cancel
Save