You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2019/06/28 21:29:25 UTC
[arrow] branch master updated: ARROW-4301: [Java] use arrow-jni
profile for both gandiva/orc
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 0ab97c6 ARROW-4301: [Java] use arrow-jni profile for both gandiva/orc
0ab97c6 is described below
commit 0ab97c618814eb9116d50583da9e02e821865c2e
Author: Pindikura Ravindra <ra...@dremio.com>
AuthorDate: Sat Jun 29 06:29:12 2019 +0900
ARROW-4301: [Java] use arrow-jni profile for both gandiva/orc
Author: Pindikura Ravindra <ra...@dremio.com>
Author: Sutou Kouhei <ko...@clear-code.com>
Closes #4717 from pravindra/arrow-4301 and squashes the following commits:
aa904ed3c <Sutou Kouhei> Sort arguments
284cd642f <Sutou Kouhei> Remove needless dependency
69adf7a9c <Pindikura Ravindra> correct args passed to mvn release
426e23dd5 <Pindikura Ravindra> move output dir arg to the end
ac2fb1c1b <Sutou Kouhei> Use the common output directory for ORC JNI
04e4fc19b <Sutou Kouhei> Build C++ for Java Gandiva and ORC
e3e4b4481 <Pindikura Ravindra> update gandiva profile
2622b1a34 <Pindikura Ravindra> ARROW-4301: use arrow-jni profile for both gandiva/orc
---
ci/travis_script_gandiva_java.sh | 4 ++--
cpp/src/jni/orc/CMakeLists.txt | 5 +----
dev/release/00-prepare.sh | 28 +++++++++++++++++++++++++---
dev/tasks/gandiva-jars/build-java.sh | 4 ++--
java/README.md | 20 +++++---------------
java/adapter/orc/pom.xml | 2 +-
java/gandiva/pom.xml | 4 ++--
java/pom.xml | 24 ++----------------------
8 files changed, 40 insertions(+), 51 deletions(-)
diff --git a/ci/travis_script_gandiva_java.sh b/ci/travis_script_gandiva_java.sh
index 9d5871f..9ea89b7 100755
--- a/ci/travis_script_gandiva_java.sh
+++ b/ci/travis_script_gandiva_java.sh
@@ -27,9 +27,9 @@ export MAVEN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Sl
pushd $JAVA_DIR
# build with gandiva profile
-$TRAVIS_MVN -P gandiva -B install -DskipTests -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debug
+$TRAVIS_MVN -P arrow-jni -B install -DskipTests -Darrow.cpp.build.dir=$CPP_BUILD_DIR/debug
# run gandiva tests
-$TRAVIS_MVN test -P gandiva -pl gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debug
+$TRAVIS_MVN test -P arrow-jni -pl gandiva -Darrow.cpp.build.dir=$CPP_BUILD_DIR/debug
popd
diff --git a/cpp/src/jni/orc/CMakeLists.txt b/cpp/src/jni/orc/CMakeLists.txt
index 54705fc..68da11f 100644
--- a/cpp/src/jni/orc/CMakeLists.txt
+++ b/cpp/src/jni/orc/CMakeLists.txt
@@ -45,11 +45,8 @@ add_arrow_lib(arrow_orc_jni
${JNI_HEADERS_DIR}
PRIVATE_INCLUDES
${JNI_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
DEPENDENCIES
arrow_static
- arrow_orc_java
- OUTPUT_PATH
- ${CMAKE_CURRENT_BINARY_DIR})
+ arrow_orc_java)
add_dependencies(arrow_orc_jni ${ARROW_ORC_JNI_LIBRARIES})
diff --git a/dev/release/00-prepare.sh b/dev/release/00-prepare.sh
index 9ddb92a..b51ba7b 100755
--- a/dev/release/00-prepare.sh
+++ b/dev/release/00-prepare.sh
@@ -208,11 +208,33 @@ if [ ${PREPARE_VERSION_PRE_TAG} -gt 0 ]; then
fi
if [ ${PREPARE_TAG} -gt 0 ]; then
- cd "${SOURCE_DIR}/../../java"
+ profile=arrow-jni # this includes components which depend on arrow cpp.
+ pushd "${SOURCE_DIR}/../../java"
git submodule update --init --recursive
+ cpp_dir="${PWD}/../cpp"
+ cpp_build_dir=$(mktemp -d -t "apache-arrow-cpp.XXXXX")
+ pushd ${cpp_build_dir}
+ cmake \
+ -DARROW_GANDIVA=ON \
+ -DARROW_GANDIVA_JAVA=ON \
+ -DARROW_JNI=ON \
+ -DARROW_ORC=ON \
+ -DCMAKE_BUILD_TYPE=release \
+ -G Ninja \
+ "${cpp_dir}"
+ ninja
+ popd
mvn release:clean
- mvn release:prepare -Dtag=${tag} -DreleaseVersion=${version} -DautoVersionSubmodules -DdevelopmentVersion=${next_version_snapshot}
- cd -
+ mvn \
+ release:prepare \
+ -Darguments=-Darrow.cpp.build.dir=${cpp_build_dir}/release \
+ -DautoVersionSubmodules \
+ -DdevelopmentVersion=${next_version_snapshot} \
+ -DreleaseVersion=${version} \
+ -Dtag=${tag} \
+ -P ${profile}
+ rm -rf ${cpp_build_dir}
+ popd
fi
############################## Post-Tag Commits #############################
diff --git a/dev/tasks/gandiva-jars/build-java.sh b/dev/tasks/gandiva-jars/build-java.sh
index bbbf74a..50122e4 100755
--- a/dev/tasks/gandiva-jars/build-java.sh
+++ b/dev/tasks/gandiva-jars/build-java.sh
@@ -27,9 +27,9 @@ pushd java
fi
# build the entire project
- mvn clean install -DskipTests -P gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR
+ mvn clean install -DskipTests -P arrow-jni -Darrow.cpp.build.dir=$CPP_BUILD_DIR
# test only gandiva
- mvn test -P gandiva -pl gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR
+ mvn test -P arrow-jni -pl gandiva -Darrow.cpp.build.dir=$CPP_BUILD_DIR
# copy the jars to distribution folder
find gandiva/target/ -name "*.jar" -not -name "*tests*" -exec cp {} $CPP_BUILD_DIR \;
popd
diff --git a/java/README.md b/java/README.md
index cecdd40..b19bfda 100644
--- a/java/README.md
+++ b/java/README.md
@@ -31,29 +31,19 @@ install:
cd java
mvn install
```
+## Building and running tests for arrow jni modules like gandiva and orc (optional)
-## Building and running tests for gandiva (optional)
-
-[Gandiva cpp][2] must be built before this step. The cpp build directory must
-be provided as the value for argument gandiva.cpp.build.dir. eg.
+[Arrow Cpp][2] must be built before this step. The cpp build directory must
+be provided as the value for argument arrow.cpp.build.dir. eg.
```
cd java
-mvn install -P gandiva -pl gandiva -am -Dgandiva.cpp.build.dir=../../debug
+mvn install -P arrow-jni -am -Darrow.cpp.build.dir=../../release
```
-This library is still in Alpha stages, and subject to API changes without
+The gandiva library is still in Alpha stages, and subject to API changes without
deprecation warnings.
-## Building and running tests for arrow jni (optional)
-Arrow Cpp must be built before this step. The cpp build directory must
-be provided as the value for argument arrow.cpp.build.dir. eg.
-
-```
-cd java
-mvn install -P native-orc -pl arrow-jni -am -Darrow.cpp.build.dir=../../release
-```
-
## Java Code Style Guide
Arrow Java follows the Google style guide [here][3] with the following
diff --git a/java/adapter/orc/pom.xml b/java/adapter/orc/pom.xml
index f718dd2..595d679 100644
--- a/java/adapter/orc/pom.xml
+++ b/java/adapter/orc/pom.xml
@@ -103,7 +103,7 @@
<build>
<resources>
<resource>
- <directory>${arrow.cpp.build.dir}/src/jni/orc</directory>
+ <directory>${arrow.cpp.build.dir}</directory>
<includes>
<include>**/libarrow_orc_jni.*</include>
</includes>
diff --git a/java/gandiva/pom.xml b/java/gandiva/pom.xml
index d59250c..dec0221 100644
--- a/java/gandiva/pom.xml
+++ b/java/gandiva/pom.xml
@@ -29,7 +29,7 @@
<protobuf.version>2.5.0</protobuf.version>
<dep.guava.version>18.0</dep.guava.version>
<checkstyle.failOnViolation>true</checkstyle.failOnViolation>
- <gandiva.cpp.build.dir>../../cpp/build/debug</gandiva.cpp.build.dir>
+ <arrow.cpp.build.dir>../../../cpp/release-build</arrow.cpp.build.dir>
</properties>
<dependencies>
<dependency>
@@ -109,7 +109,7 @@
<build>
<resources>
<resource>
- <directory>${gandiva.cpp.build.dir}</directory>
+ <directory>${arrow.cpp.build.dir}</directory>
<includes>
<include>**/gandiva_jni.*</include>
<include>**/libgandiva_jni.*</include>
diff --git a/java/pom.xml b/java/pom.xml
index 916b7f1..bdfb038 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -670,32 +670,12 @@
</profile>
<profile>
- <!-- gandiva java depends on gandiva cpp, and gandiva cpp isn't enabled by default yet -->
- <id>gandiva</id>
- <modules>
- <module>format</module>
- <module>memory</module>
- <module>vector</module>
- <module>tools</module>
- <module>adapter/jdbc</module>
- <module>plasma</module>
- <module>flight</module>
- <module>gandiva</module>
- </modules>
- </profile>
-
- <profile>
<!-- orc java depends on arrow cpp, and arrow cpp isn't enabled by default yet -->
<id>arrow-jni</id>
<modules>
- <module>format</module>
- <module>memory</module>
- <module>vector</module>
- <module>tools</module>
- <module>adapter/jdbc</module>
+ <!-- these have dependency on cpp -->
<module>adapter/orc</module>
- <module>plasma</module>
- <module>flight</module>
+ <module>gandiva</module>
</modules>
</profile>
</profiles>