fixed variable names in monitor script
This commit is contained in:
parent
00d516360f
commit
a445c1ac3d
|
@ -19,6 +19,6 @@ cat step21-createMonitorDB.sql | sed s/SOURCE/$1/g | sed s/TARGET/$2/g1 | impala
|
||||||
echo "Impala shell finished"
|
echo "Impala shell finished"
|
||||||
|
|
||||||
echo "Updating shadow monitor database"
|
echo "Updating shadow monitor database"
|
||||||
impala-shell -d $3 -q "show tables" --delimited | sed 's/^/drop view if exists $3./' | sed 's/$/;/' | impala-shell -f -
|
impala-shell -d $SHADOW -q "show tables" --delimited | sed 's/^/drop view if exists $SHADOW./' | sed 's/$/;/' | impala-shell -f -
|
||||||
impala-shell -d $2 -q "show tables" --delimited | sed 's/\(.*\)/create view $3.\1 as select * from $2.\1;/' | impala-shell -f -
|
impala-shell -d $TARGET -q "show tables" --delimited | sed 's/\(.*\)/create view $SHADOW.\1 as select * from $TARGET.\1;/' | impala-shell -f -
|
||||||
echo "Shadow db ready!"
|
echo "Shadow db ready!"
|
||||||
|
|
|
@ -29,7 +29,7 @@ select rcount.pid, sum(case when rcount.type='publication' then rcount.count els
|
||||||
from rcount
|
from rcount
|
||||||
group by rcount.pid;
|
group by rcount.pid;
|
||||||
|
|
||||||
create view ${stats_db_name}.rndexpenditure as select * from stats_ext.rndexpediture
|
create view ${stats_db_name}.rndexpenditure as select * from stats_ext.rndexpediture;
|
||||||
|
|
||||||
ANALYZE TABLE ${stats_db_name}.result_projectcount COMPUTE STATISTICS;
|
ANALYZE TABLE ${stats_db_name}.result_projectcount COMPUTE STATISTICS;
|
||||||
ANALYZE TABLE ${stats_db_name}.result_projectcount COMPUTE STATISTICS FOR COLUMNS;
|
ANALYZE TABLE ${stats_db_name}.result_projectcount COMPUTE STATISTICS FOR COLUMNS;
|
||||||
|
|
Loading…
Reference in New Issue