Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16529 )
Change subject: IMPALA-10172: Support Hive metastore managed locations for databases ...................................................................... IMPALA-10172: Support Hive metastore managed locations for databases This change lets the user set the managed location path in new databases, e.g. CREATE DATABASE db MANAGEDLOCATION 'some url'; This property sets the location where the database's tables with table property 'transactional'='true' will be placed. The change also adds managedlocation to DESCRIBE DATABASE's output. Example: DESCRIBE DATABASE db; +------------------+-----------------------------------------+---------+ | name | location | comment | +------------------+-----------------------------------------+---------+ | db | hdfs://localhost:20500/test-warehouse/a | | | managedlocation: | hdfs://localhost:20500/test-warehouse/b | | +------------------+-----------------------------------------+---------+ DESCRIBE DATABASE EXTENDED db6; +------------------+-----------------------------------------+---------+ | name | location | comment | +------------------+-----------------------------------------+---------+ | db | hdfs://localhost:20500/test-warehouse/a | | | managedlocation: | hdfs://localhost:20500/test-warehouse/b | | | Owner: | | | | | csringhofer | USER | +------------------+-----------------------------------------+---------+ Note that Impala's output for DESCRIBE DATABASE (EXTENDED) is different than Hive's, where a new column was added for each extra piece of information, while Impala adds a new row to keep the 3 column format. Changing to Hive's format would be preferable in my opinion, but is a potentially breaking change. See IMPALA-6686 for further discussion. Testing: - added FE and EE tests - ran relevant tests Change-Id: I925632a43ff224f762031e89981896722e453399 Reviewed-on: http://gerrit.cloudera.org:8080/16529 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M common/thrift/JniCatalog.thrift M fe/src/main/cup/sql-parser.cup M fe/src/main/java/org/apache/impala/analysis/CreateDbStmt.java M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java M fe/src/main/java/org/apache/impala/service/DescribeResultFactory.java M fe/src/main/jflex/sql-scanner.flex M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java M testdata/workloads/functional-query/queries/QueryTest/create-database.test M testdata/workloads/functional-query/queries/QueryTest/describe-db.test M testdata/workloads/functional-query/queries/QueryTest/describe-hive-db.test M tests/metadata/test_metadata_query_statements.py 12 files changed, 197 insertions(+), 23 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/16529 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I925632a43ff224f762031e89981896722e453399 Gerrit-Change-Number: 16529 Gerrit-PatchSet: 8 Gerrit-Owner: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Tamas Mate <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
