stats DB for monitor #99
|
@ -19,6 +19,7 @@ cat step21-createMonitorDB.sql | sed s/SOURCE/$1/g | sed s/TARGET/$2/g1 | impala
|
|||
echo "Impala shell finished"
|
||||
|
||||
echo "Updating shadow monitor database"
|
||||
impala-shell -d $SHADOW -q "show tables" --delimited | sed 's/^/drop view if exists $SHADOW./' | sed 's/$/;/' | 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 -
|
||||
impala-shell -q "create database if not exists ${SHADOW}"
|
||||
impala-shell -d $SHADOW -q "show tables" --delimited | sed "s/^/drop view if exists ${SHADOW}./" | sed "s/$/;/" | 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!"
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</configuration>
|
||||
</global>
|
||||
|
||||
<start to="step21-createMonitorDB"/>
|
||||
<start to="Step1"/>
|
||||
|
||||
<kill name="Kill">
|
||||
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
|
||||
|
@ -320,8 +320,8 @@
|
|||
<job-tracker>${jobTracker}</job-tracker>
|
||||
<name-node>${nameNode}</name-node>
|
||||
<exec>monitor.sh</exec>
|
||||
<argument>${stats-db-name}</argument>
|
||||
<argument>${monitor-db-name}</argument>
|
||||
<argument>${stats_db_name}</argument>
|
||||
<argument>${monitor_db_name}</argument>
|
||||
<argument>${monitor_db_shadow_name}</argument>
|
||||
<argument>${wf:appPath()}/scripts/step21-createMonitorDB.sql</argument>
|
||||
<file>monitor.sh</file>
|
||||
|
|
Loading…
Reference in New Issue