2020-06-13 12:35:53 +02:00
|
|
|
export PYTHON_EGG_CACHE=/home/$(whoami)/.python-eggs
|
2020-06-11 20:01:14 +02:00
|
|
|
export link_folder=/tmp/impala-shell-python-egg-cache-$(whoami)
|
|
|
|
if ! [ -L $link_folder ]
|
|
|
|
then
|
|
|
|
rm -Rf "$link_folder"
|
|
|
|
ln -sfn ${PYTHON_EGG_CACHE}${link_folder} ${link_folder}
|
|
|
|
fi
|
|
|
|
|
2020-06-13 12:35:53 +02:00
|
|
|
echo "Getting file from " $3
|
2020-06-11 20:01:14 +02:00
|
|
|
hdfs dfs -copyToLocal $3
|
|
|
|
|
2020-06-13 12:35:53 +02:00
|
|
|
echo "Running impala shell make the new database visible"
|
|
|
|
impala-shell -q "INVALIDATE METADATA;"
|
|
|
|
|
|
|
|
echo "Running impala shell to compute new table stats"
|
2020-06-11 20:01:14 +02:00
|
|
|
impala-shell -d $1 -f $2
|
2020-06-13 12:35:53 +02:00
|
|
|
echo "Impala shell finished"
|
2020-06-11 20:01:14 +02:00
|
|
|
rm $2
|