Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade hadoop version and set java/hadoop home in docker image #10446

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions scripts/adapters.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ RUN mamba create -y --name adapters python=3.8
SHELL ["mamba", "run", "-n", "adapters", "/bin/bash", "-c"]

RUN pip install https://github.com/googleapis/storage-testbench/archive/refs/tags/v0.36.0.tar.gz
RUN mamba install -y nodejs openjdk
RUN mamba install -y nodejs
RUN npm install -g azurite

ENV HADOOP_HOME=/usr/local/hadoop \
HADOOP_ROOT_LOGGER="WARN,DRFA" \
LC_ALL=C \
LIBHDFS3_CONF=/velox/scripts/hdfs-client.xml \
PATH=/usr/local/hadoop/bin:${PATH}
PATH=/usr/local/hadoop/bin:${PATH} \
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk \
PATH=/usr/lib/jvm/java-1.8.0-openjdk/bin:${PATH}

ENTRYPOINT ["/bin/bash", "-c", "source /opt/rh/gcc-toolset-12/enable && exec \"$@\"", "--"]
COPY scripts/setup-classpath.sh /
ENTRYPOINT ["/bin/bash", "-c", "source /set_classpath.sh && source /opt/rh/gcc-toolset-12/enable && exec \"$@\"", "--"]
CMD ["/bin/bash"]
6 changes: 5 additions & 1 deletion scripts/setup-adapters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,12 @@ function install_hdfs_deps {
sed -i "/FIND_PACKAGE(GoogleTest REQUIRED)/d" $libhdfs3_dir/CMakeLists.txt
sed -i "s/dumpversion/dumpfullversion/" $libhdfs3_dir/CMake/Platform.cmake
# Dependencies for Hadoop testing
wget_and_untar https://archive.apache.org/dist/hadoop/common/hadoop-2.10.1/hadoop-2.10.1.tar.gz hadoop
wget_and_untar https://archive.apache.org/dist/hadoop/common/hadoop-3.3.0/hadoop-3.3.0.tar.gz hadoop
cp -a hadoop /usr/local/
wget -P /usr/local/hadoop/share/hadoop/common/lib/ https://repo1.maven.org/maven2/junit/junit/4.11/junit-4.11.jar

yum install -y java-1.8.0-openjdk-devel

fi
cmake_install $libhdfs3_dir
}
Expand Down
16 changes: 16 additions & 0 deletions scripts/setup-classpath.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed 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.

export CLASSPATH=`/usr/local/hadoop/bin/hdfs classpath --glob`
Loading