Repository: incubator-impala Updated Branches: refs/heads/master 8ad6d0331 -> fc275fab6
IMPALA-5941: Fix Metastore schema creation in create-test-configuration.sh The Hive Metastore schema script includes other SQL scripts using \i, which expects absolute paths. Since we currently invoke it from outside the schema script directory, it is unable to find those included scripts. The fix is to switch to the Hive Metastore script directory when invoking the schema script. Change-Id: Ic312df4597c7d211d4ecd551d572f751aea0cd24 Reviewed-on: http://gerrit.cloudera.org:8080/8081 Reviewed-by: Tim Armstrong <[email protected]> Tested-by: David Knupp <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/eecbbcb7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/eecbbcb7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/eecbbcb7 Branch: refs/heads/master Commit: eecbbcb7c7f392c417d4b65117435faf6ef32820 Parents: 8ad6d03 Author: Joe McDonnell <[email protected]> Authored: Fri Sep 15 09:30:24 2017 -0700 Committer: David Knupp <[email protected]> Committed: Tue Sep 19 22:59:04 2017 +0000 ---------------------------------------------------------------------- bin/create-test-configuration.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/eecbbcb7/bin/create-test-configuration.sh ---------------------------------------------------------------------- diff --git a/bin/create-test-configuration.sh b/bin/create-test-configuration.sh index a59d6f7..2f981aa 100755 --- a/bin/create-test-configuration.sh +++ b/bin/create-test-configuration.sh @@ -92,8 +92,11 @@ if [ $CREATE_METASTORE -eq 1 ]; then dropdb -U hiveuser ${METASTORE_DB} 2> /dev/null || true createdb -U hiveuser ${METASTORE_DB} - psql -q -U hiveuser -d ${METASTORE_DB} \ - -f ${HIVE_HOME}/scripts/metastore/upgrade/postgres/hive-schema-1.1.0.postgres.sql + # Hive schema SQL scripts include other scripts using \i, which expects absolute paths. + # Switch to the scripts directory to make this work. + pushd ${HIVE_HOME}/scripts/metastore/upgrade/postgres + psql -q -U hiveuser -d ${METASTORE_DB} -f hive-schema-1.1.0.postgres.sql + popd # Increase the size limit of PARAM_VALUE from SERDE_PARAMS table to be able to create # HBase tables with large number of columns. echo "alter table \"SERDE_PARAMS\" alter column \"PARAM_VALUE\" type character varying" \
