Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
[BUG] Fix hadoop ai build path (#2262)
Browse files Browse the repository at this point in the history
* fix hadoop ai build bugs

* refine
  • Loading branch information
mzmssg authored Mar 5, 2019
1 parent bbf398e commit 2429b23
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/hadoop-ai/build/build-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,33 @@

pushd $(dirname "$0") > /dev/null

hadoopBinaryDir="/hadoop-binary/"
hadoopBinaryDir="/hadoop-binary"

hadoopBinaryPath="${hadoopBinaryDir}hadoop-2.9.0.tar.gz"
cacheVersion="${hadoopBinaryDir}12940533-12933562-docker_executor-done"
# When Changing the patch id, please update it.
patchId="12940533-12933562-docker_executor"

hadoopBinaryPath="${hadoopBinaryDir}/hadoop-2.9.0.tar.gz"
cacheVersion="${hadoopBinaryDir}/${patchId}-done"

echo "hadoopbinarypath:${hadoopBinaryDir}"

[[ -f $cacheVersion ]] && [[ -f $hadoopBinaryPath ]] && [[ $cacheVersion -ot $hadoopBinaryPath ]] &&
echo "Hadoop binary path: ${hadoopBinaryDir}"

[[ -f ${cacheVersion} ]] && [[ -f ${hadoopBinaryPath} ]] && [[ ${cacheVersion} -ot ${hadoopBinaryPath} ]] &&
{
echo "Hadoop ai with patch 12940533-12933562-docker_executor has been built"
echo "Hadoop ai with patch ${patchId} has been built"
echo "Skip this build precess"
exit 0
}

[[ ! -f "$hadoopBinaryPath" ]] ||
[[ ! -f "${hadoopBinaryPath}" ]] ||
{

rm -rf $hadoopBinaryPath
rm -rf ${hadoopBinaryPath}

}

# When Changing the patch id, please update the filename here.
rm ${hadoopBinaryDir}/*-done
touch $cacheVersion
touch ${cacheVersion}

docker build -t hadoop-build -f hadoop-ai .

Expand Down

0 comments on commit 2429b23

Please sign in to comment.