Skip to content

Apache DataFusion SQL Query Engine

ARROW-7930: [CI][Python] Test jpype integration

Antoine Pitrou89ef6979dc52
diff --git a/ci/docker/conda-python-jpype.dockerfile b/ci/docker/conda-python-jpype.dockerfile
new file mode 100644
index 0000000000..f77ef9bf66
--- /dev/null
+++ b/ci/docker/conda-python-jpype.dockerfile
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+ARG repo
+ARG arch=amd64
+ARG python=3.6
+FROM ${repo}:${arch}-conda-python-${python}
+
+ARG jdk=11
+ARG maven=3.6
+RUN conda install -q \
+ maven=${maven} \
+ openjdk=${jdk} \
+ jpype1 && \
+ conda clean --all
diff --git a/ci/scripts/python_test.sh b/ci/scripts/python_test.sh
index 832a5252e9..6f961d2f8e 100755
--- a/ci/scripts/python_test.sh
+++ b/ci/scripts/python_test.sh
@@ -21,6 +21,7 @@ set -ex
arrow_dir=${1}
+export ARROW_SOURCE_DIR=${arrow_dir}
export ARROW_TEST_DATA=${arrow_dir}/testing/data
export PARQUET_TEST_DATA=${arrow_dir}/cpp/submodules/parquet-testing/data
export LD_LIBRARY_PATH=${ARROW_HOME}/lib:${LD_LIBRARY_PATH}
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index 2bc7b5a79b..8b03b187e9 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -123,6 +123,7 @@ groups:
- test-conda-python-3.7-turbodbc-master
- test-conda-python-3.7-hdfs-2.9.2
- test-conda-python-3.7-spark-master
+ - test-conda-python-3.8-jpype
# - test-conda-cpp-hiveserver2
test:
@@ -203,6 +204,7 @@ groups:
- test-conda-python-3.7-turbodbc-master
- test-conda-python-3.7-hdfs-2.9.2
- test-conda-python-3.7-spark-master
+ - test-conda-python-3.8-jpype
# - test-conda-cpp-hiveserver2
######################## Tasks to run regularly #############################
@@ -286,6 +288,7 @@ groups:
- test-conda-python-3.7-turbodbc-master
- test-conda-python-3.7-hdfs-2.9.2
- test-conda-python-3.7-spark-master
+ - test-conda-python-3.8-jpype
tasks:
# arbitrary_task_name:
@@ -2013,6 +2016,20 @@ tasks:
- docker-compose build --no-cache conda-python-dask
- docker-compose run conda-python-dask
+ test-conda-python-3.8-jpype:
+ ci: circle
+ platform: linux
+ template: docker-tests/circle.linux.yml
+ params:
+ commands:
+ - export PYTHON=3.8
+ - docker-compose pull --ignore-pull-failures conda-cpp
+ - docker-compose pull --ignore-pull-failures conda-python
+ - docker-compose build conda-cpp
+ - docker-compose build conda-python
+ - docker-compose build --no-cache conda-python-jpype
+ - docker-compose run conda-python-jpype
+
test-conda-python-3.7-turbodbc-latest:
ci: circle
platform: linux
diff --git a/docker-compose.yml b/docker-compose.yml
index 10ddc342d2..51d1699e28 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -608,6 +608,34 @@ services:
/arrow/ci/scripts/python_build.sh /arrow /build &&
/arrow/ci/scripts/integration_dask.sh"]
+ conda-python-jpype:
+ # Usage:
+ # docker-compose build conda-cpp
+ # docker-compose build conda-python
+ # docker-compose build conda-python-jpype
+ # docker-compose run --rm conda-python-jpype
+ image: ${REPO}:${ARCH}-conda-python-${PYTHON}-jpype
+ build:
+ context: .
+ dockerfile: ci/docker/conda-python-jpype.dockerfile
+ cache_from:
+ - ${REPO}:${ARCH}-conda-python-${PYTHON}-jpype
+ args:
+ repo: ${REPO}
+ arch: ${ARCH}
+ python: ${PYTHON}
+ shm_size: *shm-size
+ environment:
+ <<: *ccache
+ ARROW_FLIGHT: "OFF"
+ ARROW_GANDIVA: "OFF"
+ volumes: *conda-volumes
+ command:
+ ["/arrow/ci/scripts/cpp_build.sh /arrow /build &&
+ /arrow/ci/scripts/python_build.sh /arrow /build &&
+ /arrow/ci/scripts/java_build.sh /arrow /build &&
+ /arrow/ci/scripts/python_test.sh /arrow"]
+
conda-python-turbodbc:
# Possible $DASK parameters:
# - `latest`: latest release