Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
ctr-estimate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵建伟
ctr-estimate
Commits
0126e42e
Commit
0126e42e
authored
Apr 20, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
2565d241
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
auto.sh
bin/auto.sh
+11
-11
No files found.
bin/auto.sh
View file @
0126e42e
...
@@ -2,27 +2,28 @@
...
@@ -2,27 +2,28 @@
# */5 * * * * /srv/apps/ctr-estimate/bin/auto.sh >> /data/log/ctr-estimate/auto.out
# */5 * * * * /srv/apps/ctr-estimate/bin/auto.sh >> /data/log/ctr-estimate/auto.out
echo
"*************************************************************"
task_names
=(
ctr-estimate-clk-crt ctr-estimate-pfr-crt ctr-estimate-pfr-rct ctr-estimate-tag-crt
)
task_names
=(
ctr-estimate-clk-crt ctr-estimate-pfr-crt ctr-estimate-pfr-rct ctr-estimate-tag-crt
)
for
element
in
"
${
task_names
[@]
}
"
for
element
in
"
${
task_names
[@]
}
"
do
do
app_id
=
`
/opt/hadoop-2.6.0-cdh5.16.1/bin/yarn application
-list
|
grep
-w
$element
|
awk
'{print $1}'
`
app_id
=
`
/opt/hadoop-2.6.0-cdh5.16.1/bin/yarn application
-list
|
grep
-w
$element
|
awk
'{print $1}'
`
if
[[
-z
$app_id
]]
;
then
if
[[
-z
$app_id
]]
;
then
if
[
"ctr-estimate-clk-crt"
==
"
$element
"
]
;
then
if
[
"ctr-estimate-clk-crt"
==
"
$element
"
]
;
then
nohup
/srv/apps/ctr-estimate/bin/start_clk_crt.sh 2>&1 &
nohup
/srv/apps/ctr-estimate/bin/start_clk_crt.sh 2>&1 &
>
/dev/null
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
r
estart task "
$element
" ..."
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
R
estart task "
$element
" ..."
elif
[
"ctr-estimate-pfr-crt"
==
"
$element
"
]
;
then
elif
[
"ctr-estimate-pfr-crt"
==
"
$element
"
]
;
then
nohup
/srv/apps/ctr-estimate/bin/start_pfr_crt.sh 2>&1 &
nohup
/srv/apps/ctr-estimate/bin/start_pfr_crt.sh 2>&1 &
>
/dev/null
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
r
estart task "
$element
" ..."
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
R
estart task "
$element
" ..."
elif
[
"ctr-estimate-pfr-rct"
==
"
$element
"
]
;
then
elif
[
"ctr-estimate-pfr-rct"
==
"
$element
"
]
;
then
nohup
/srv/apps/ctr-estimate/bin/start_pfr_rct.sh 2>&1 &
nohup
/srv/apps/ctr-estimate/bin/start_pfr_rct.sh 2>&1 &
>
/dev/null
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
r
estart task "
$element
" ..."
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
R
estart task "
$element
" ..."
elif
[
"ctr-estimate-tag-crt"
==
"
$element
"
]
;
then
elif
[
"ctr-estimate-tag-crt"
==
"
$element
"
]
;
then
nohup
/srv/apps/ctr-estimate/bin/start_tag_crt.sh 2>&1 &
nohup
/srv/apps/ctr-estimate/bin/start_tag_crt.sh 2>&1 &
>
/dev/null
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
r
estart task "
$element
" ..."
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
R
estart task "
$element
" ..."
else
else
echo
$element
" is not a valid task name, please check it again!"
echo
$element
" is not a valid task name, please check it again!"
fi
fi
else
else
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
t
ask "
$element
" is running ..."
echo
`
date
+
"%Y-%m-%d %H:%M:%S"
`
":
T
ask "
$element
" is running ..."
fi
fi
done
done
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment