Skip to content

Commit

Permalink
fix: adding env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed Aug 29, 2024
1 parent 4a7c7c2 commit 12df50c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ci/scripts/java_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ java_jni_dist_dir=${3}

: ${BUILD_DOCS_JAVA:=OFF}

# enable the memory debug logs by setting to true.
# default set to false.
export ARROW_MEMORY_DEBUG_ALLOCATOR=true

if [[ "$(uname -s)" == "Linux" ]] && [[ "$(uname -m)" == "s390x" ]]; then
# Since some files for s390_64 are not available at maven central,
# download pre-build files from Artifactory and install them explicitly
Expand All @@ -45,7 +49,7 @@ if [[ "$(uname -s)" == "Linux" ]] && [[ "$(uname -m)" == "s390x" ]]; then
# target=${artifact}-${ver}-${classifier}.${extension}
target=${artifact}
${wget} ${artifactory_base_url}/${artifactory_dir}/${ver}/${target}
${mvn_install} -DgroupId=${group} -DartifactId=${artifact} -Dversion=${ver} -Dclassifier=${classifier} -Dpackaging=${extension} -Dfile=$(pwd)/${target} -Darrow.memory.debug.allocator=true
${mvn_install} -DgroupId=${group} -DartifactId=${artifact} -Dversion=${ver} -Dclassifier=${classifier} -Dpackaging=${extension} -Dfile=$(pwd)/${target}
# protoc requires libprotoc.so.* libprotobuf.so.*
libver="32"
${wget} ${artifactory_base_url}/${artifactory_dir}/${ver}/libprotoc.so.${libver}
Expand All @@ -63,7 +67,7 @@ if [[ "$(uname -s)" == "Linux" ]] && [[ "$(uname -m)" == "s390x" ]]; then
# target=${artifact}-${ver}-${classifier}.${extension}
target=${artifact}
${wget} ${artifactory_base_url}/${artifactory_dir}/${ver}/${target}
${mvn_install} -DgroupId=${group} -DartifactId=${artifact} -Dversion=${ver} -Dclassifier=${classifier} -Dpackaging=${extension} -Dfile=$(pwd)/${target} -Darrow.memory.debug.allocator=true
${mvn_install} -DgroupId=${group} -DartifactId=${artifact} -Dversion=${ver} -Dclassifier=${classifier} -Dpackaging=${extension} -Dfile=$(pwd)/${target}
fi

mvn="mvn -B -DskipTests -Drat.skip=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
Expand Down Expand Up @@ -96,7 +100,7 @@ if [ "${ARROW_JAVA_JNI}" = "ON" ]; then
fi

# Use `2 * ncores` threads
${mvn} -T 2C clean install -Darrow.memory.debug.allocator=true
${mvn} -T 2C clean install

if [ "${BUILD_DOCS_JAVA}" == "ON" ]; then
# HTTP pooling is turned of to avoid download issues https://issues.apache.org/jira/browse/ARROW-11633
Expand Down
4 changes: 4 additions & 0 deletions java/memory/memory-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ under the License.
<properties>
<!-- List of add-opens arg line arguments for this module's tests -->
<surefire.add-opens.argLine>--add-reads=org.apache.arrow.memory.core=ch.qos.logback.classic --add-opens=java.base/java.lang.reflect=org.apache.arrow.memory.core --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</surefire.add-opens.argLine>
<arrow.memory.debug.allocator>${env.ARROW_MEMORY_DEBUG_ALLOCATOR}</arrow.memory.debug.allocator>
</properties>

<dependencies>
Expand Down Expand Up @@ -89,6 +90,9 @@ under the License.
<!-- Test is only useful when NOT running with add-opens -->
<exclude>**/TestOpens.java</exclude>
</excludes>
<systemPropertyVariables>
<arrow.memory.debug.allocator>${arrow.memory.debug.allocator}</arrow.memory.debug.allocator>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
Expand Down

0 comments on commit 12df50c

Please sign in to comment.