From bcbfc052b1e5c3f8c74d5c80c140d8eb2133d7e1 Mon Sep 17 00:00:00 2001 From: antleb Date: Thu, 18 Feb 2021 16:32:54 +0200 Subject: [PATCH] fixed last errors in step 21 --- .../eu/dnetlib/dhp/oa/graph/stats/oozie_app/monitor.sh | 5 +++-- .../eu/dnetlib/dhp/oa/graph/stats/oozie_app/workflow.xml | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/monitor.sh b/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/monitor.sh index c5700c8fc..b638311e3 100644 --- a/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/monitor.sh +++ b/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/monitor.sh @@ -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!" diff --git a/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/workflow.xml b/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/workflow.xml index c418ffd6c..c3cf15d8a 100644 --- a/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/workflow.xml +++ b/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/workflow.xml @@ -58,7 +58,7 @@ - + Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}] @@ -320,8 +320,8 @@ ${jobTracker} ${nameNode} monitor.sh - ${stats-db-name} - ${monitor-db-name} + ${stats_db_name} + ${monitor_db_name} ${monitor_db_shadow_name} ${wf:appPath()}/scripts/step21-createMonitorDB.sql monitor.sh