Skip to content

Commit

Permalink
Make Java 21 minimum version to build Arrow
Browse files Browse the repository at this point in the history
Change miminum java build version to 21. This doesn't change the minimum
version to use Arrow which is still Java 8

Update docker images for java jni/conda integration tests to use recent
python image in order to install java 21
  • Loading branch information
laurentgo committed May 21, 2024
1 parent 7799be7 commit 32728bd
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 19 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/java_jni.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ env:

jobs:
docker:
name: AMD64 manylinux2014 Java JNI
name: AMD64 manylinux Java JNI
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
timeout-minutes: 90
Expand All @@ -68,8 +68,8 @@ jobs:
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: .docker
key: java-jni-manylinux-2014-${{ hashFiles('cpp/**', 'java/**') }}
restore-keys: java-jni-manylinux-2014-
key: java-jni-manylinux-2-28-${{ hashFiles('cpp/**', 'java/**') }}
restore-keys: java-jni-manylinux-2-28-
- name: Setup Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
Expand All @@ -80,7 +80,7 @@ jobs:
env:
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
run: archery docker run java-jni-manylinux-2014
run: archery docker run java-jni-manylinux-2-28
- name: Docker Push
if: >-
success() &&
Expand All @@ -91,7 +91,7 @@ jobs:
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
continue-on-error: true
run: archery docker push java-jni-manylinux-2014
run: archery docker push java-jni-manylinux-2-28

docker_integration_python:
name: AMD64 Conda Java C Data Interface Integration
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/conda-python-jpype.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ARG arch=amd64
ARG python=3.8
FROM ${repo}:${arch}-conda-python-${python}

ARG jdk=11
ARG jdk=21
ARG maven=3.8.7
RUN mamba install -q -y \
maven=${maven} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN vcpkg install \
--x-feature=s3

# Install Java
ARG java=1.8.0
ARG java=21
ARG maven=3.9.3
RUN yum install -y java-$java-openjdk-devel && \
yum clean all && \
Expand Down
4 changes: 2 additions & 2 deletions dev/tasks/java-jars/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
archery docker run \
-e ARROW_JAVA_BUILD=OFF \
-e ARROW_JAVA_TEST=OFF \
java-jni-manylinux-2014
java-jni-manylinux-2-28
- name: Compress into single artifact to keep directory structure
run: tar -cvzf arrow-shared-libs-linux-{{ arch }}.tar.gz arrow/java-dist/
- name: Upload artifacts
Expand All @@ -69,7 +69,7 @@ jobs:
{{ macros.github_login_dockerhub()|indent }}
- name: Push Docker image
shell: bash
run: archery docker push java-jni-manylinux-2014
run: archery docker push java-jni-manylinux-2-28
{% endif %}

build-cpp-macos:
Expand Down
20 changes: 10 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ x-hierarchy:
# helper services
- impala
- postgres
- python-wheel-manylinux-2014:
- java-jni-manylinux-2014
- python-wheel-manylinux-2-28
- python-wheel-manylinux-2014
- python-wheel-manylinux-2-28:
- java-jni-manylinux-2-28
- python-wheel-manylinux-test-imports
- python-wheel-manylinux-test-unittests
- python-wheel-windows-vs2019
Expand Down Expand Up @@ -1163,22 +1163,22 @@ services:
target: "C:/arrow"
command: arrow\\ci\\scripts\\python_wheel_windows_test.bat

java-jni-manylinux-2014:
image: ${REPO}:${ARCH}-java-jni-manylinux-2014-vcpkg-${VCPKG}
java-jni-manylinux-2-28:
image: ${REPO}:${ARCH}-java-jni-manylinux-2-28-vcpkg-${VCPKG}
build:
args:
base: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2014-vcpkg-${VCPKG}
java: 1.8.0
base: ${REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2-28-vcpkg-${VCPKG}
java: 21
context: .
dockerfile: ci/docker/java-jni-manylinux-201x.dockerfile
dockerfile: ci/docker/java-jni-manylinux.dockerfile
cache_from:
- ${REPO}:${ARCH}-java-jni-manylinux-2014-vcpkg-${VCPKG}
- ${REPO}:${ARCH}-java-jni-manylinux-2-28-vcpkg-${VCPKG}
environment:
<<: [*common, *ccache]
volumes:
- .:/arrow:delegated
- ${DOCKER_VOLUME_PREFIX}maven-cache:/root/.m2:delegated
- ${DOCKER_VOLUME_PREFIX}python-wheel-manylinux2014-ccache:/ccache:delegated
- ${DOCKER_VOLUME_PREFIX}python-wheel-manylinux-2-28-ccache:/ccache:delegated
command:
["pip install -e /arrow/dev/archery && \
/arrow/ci/scripts/java_jni_manylinux_build.sh /arrow /build /arrow/java-dist && \
Expand Down
10 changes: 10 additions & 0 deletions java/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@

<properties>
<arrow.vector.classifier></arrow.vector.classifier>
<!-- org.apache:apache overrides -->
<minimalJavaBuildVersion>21</minimalJavaBuildVersion>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>
<!--
Downgrade maven-jar-plugin until https://github.com/codehaus-plexus/plexus-archiver/issues/332
is addressed
-->
<version.maven-jar-plugin>3.2.2</version.maven-jar-plugin>
</properties>

<dependencyManagement>
Expand Down
6 changes: 6 additions & 0 deletions java/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@
<properties>
<checkstyle.failOnViolation>true</checkstyle.failOnViolation>
<!-- org.apache:apache overrides -->
<minimalJavaBuildVersion>21</minimalJavaBuildVersion>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>
<!--
Downgrade maven-jar-plugin until https://github.com/codehaus-plexus/plexus-archiver/issues/332
is addressed
-->
<version.maven-jar-plugin>3.2.2</version.maven-jar-plugin>
</properties>

<build>
Expand Down
1 change: 1 addition & 0 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
<!-- List of add-opens arg line arguments if tests are running on JDK 11 or higher -->
<surefire.add-opens.argLine>--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</surefire.add-opens.argLine>
<!-- org.apache:apache overrides -->
<minimalJavaBuildVersion>21</minimalJavaBuildVersion>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>
Expand Down

0 comments on commit 32728bd

Please sign in to comment.