Fix the installation of the Swift Hadoop connector (CDH)

The jar file with the same name already exists because
it is installed with the rest of the Cloudera packages,
but it must be overwritten by our version with Swift support.
So do not exit if the jar already exists.

Story: 2001909
Task: 14422
Change-Id: Ibc0a5f7348365f2a6c5658846ee74aa92e78314b
(cherry picked from commit 8cc87685cc)
This commit is contained in:
Luigi Toscano 2018-05-04 00:35:56 +02:00
parent ba3a6c5579
commit babf644056
3 changed files with 27 additions and 36 deletions

View File

@ -8,18 +8,15 @@ HADOOP_SWIFT_BUILD_LOCATION="https://tarballs.openstack.org/sahara-extra/dist/ha
SWIFT_LIB_URI="$HADOOP_SWIFT_BUILD_LOCATION/hadoop-openstack-${hadoop}.jar"
HADOOP_SWIFT_JAR_NAME="hadoop-openstack.jar"
if [ ! -f $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME ]; then
if [ $test_only -eq 0 ]; then
wget -O $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME $SWIFT_LIB_URI
if [ $test_only -eq 0 ]; then
wget -O $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME $SWIFT_LIB_URI
if [ $? -ne 0 ]; then
echo -e "Could not download Swift Hadoop FS implementation.\nAborting"
exit 1
fi
chmod 0644 $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME
else
exit 0
if [ $? -ne 0 ]; then
echo -e "Could not download Swift Hadoop FS implementation.\nAborting"
exit 1
fi
fi
chmod 0644 $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME
else
exit 0
fi

View File

@ -8,18 +8,15 @@ HADOOP_SWIFT_BUILD_LOCATION="https://tarballs.openstack.org/sahara-extra/dist/ha
SWIFT_LIB_URI="$HADOOP_SWIFT_BUILD_LOCATION/hadoop-openstack-${hadoop}.jar"
HADOOP_SWIFT_JAR_NAME="hadoop-openstack.jar"
if [ ! -f $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME ]; then
if [ $test_only -eq 0 ]; then
wget -O $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME $SWIFT_LIB_URI
if [ $test_only -eq 0 ]; then
wget -O $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME $SWIFT_LIB_URI
if [ $? -ne 0 ]; then
echo -e "Could not download Swift Hadoop FS implementation.\nAborting"
exit 1
fi
chmod 0644 $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME
else
exit 0
if [ $? -ne 0 ]; then
echo -e "Could not download Swift Hadoop FS implementation.\nAborting"
exit 1
fi
fi
chmod 0644 $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME
else
exit 0
fi

View File

@ -8,18 +8,15 @@ HADOOP_SWIFT_BUILD_LOCATION="https://tarballs.openstack.org/sahara-extra/dist/ha
SWIFT_LIB_URI="$HADOOP_SWIFT_BUILD_LOCATION/hadoop-openstack-${hadoop}.jar"
HADOOP_SWIFT_JAR_NAME="hadoop-openstack.jar"
if [ ! -f $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME ]; then
if [ $test_only -eq 0 ]; then
wget -O $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME $SWIFT_LIB_URI
if [ $test_only -eq 0 ]; then
wget -O $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME $SWIFT_LIB_URI
if [ $? -ne 0 ]; then
echo -e "Could not download Swift Hadoop FS implementation.\nAborting"
exit 1
fi
chmod 0644 $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME
else
exit 0
if [ $? -ne 0 ]; then
echo -e "Could not download Swift Hadoop FS implementation.\nAborting"
exit 1
fi
fi
chmod 0644 $hdfs_lib_dir/$HADOOP_SWIFT_JAR_NAME
else
exit 0
fi