Friday, September 25, 2020

delopment_script

Source ~/.bashrc
runstatus=$? 
if[ $runstatus -gt 0 ]; then
    echo " `date '+℅Y-℅m-℅d ℅H:℅M:℅S.℅N' ` - $Evn - [DEBUG] -error soucre the file
   exit 1
fi

hadoop fs -test -e /user/a.hql
if [ $? -eg 0 ]; then
    echo " `date '+℅Y-℅m-℅d ℅H:℅M:℅S.℅N' ` - $Evn - [INFO] - copied successfully
hadoop fs -ls /user/a.hql
else
  echo " `date '+℅Y-℅m-℅d ℅H:℅M:℅S.℅N' ` - $Evn - [ERROR] - failed files "  
fi