In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
File: resend.sh
Path: $HOME/ggscript/ggdef
Function: this script is designed to deal with the abnormal interruption of the process caused by the failure of the definition file on the target side.
Because the source business often does not notify the target end and the system group to modify the table structure on its own.
Therefore, the script is designed to automatically generate the definition file and send it to the corresponding path of the specified target machine for normal reading of the target machine REPLICATE process.
Log path: $HOME/gglog/ggupload
#! / bin/bashcd $HOMEif [- f. Profile]; then. Profilefiif [- f. Bash _ profile]; then. .bash _ profilefiif [$#-eq 0]; then echo "info defprm" exit 2fimydate = `date + 20%y-%m-%d-%H:% M`filename = $1cd $HOME/ggserver/dirdefif [!-d bak]; then mkdir bak & & echo "Directory bak created." | | echo "Error: Failed to create directory $dr." else echo "bak directory exits!" ficd $HOME/ggserver/dirprmif [!-e $filename]; then echo "the file is not exist!" Exit 2ficat $filename > $HOME/ggscript/ggdef/tempdefsfile= `cat $HOME/ggscript/ggdef/temp | grep DEFSFILE | cut-d'/'- f 3`target = `cat $HOME/ggscript/ggdef/temp | grep TARGET: | cut-d':'- f 2`release = `cat $HOME/ggscript/ggdef/temp | grep RELEASE: | cut-d':'- f 2`echo $defsfile $target $releasecd $HOME/ggserver/dirdefif [- d `defsfile`]; then mv $defsfile bak/$defsfile ficd $HOME/ggserverif ["$release" = "10.4"] Then $HOME/gg104/defgen paramfile $HOME/ggserver/dirprm/$filename else. / defgen paramfile $HOME/ggserver/dirprm/$filenameficd $HOME/ggserver/dirdefecho $target $defsfilesize= `cat $defsfile | wc-c`ech o $size#exec / bin/bash $HOME/ggscript/ggupload/upload.sh $target $HOME/ggserver/dirdef/$defsfile sysinfoif [$size-le 1000]; then exit 2else / bin/bash $HOME/ggscript/ggupload/upload.sh $target $HOME/ggserver/dirdef/$defsfile sysinfofi
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.