[ https://issues.apache.org/jira/browse/HIVE-24425?focusedWorklogId=611136&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-611136 ]
ASF GitHub Bot logged work on HIVE-24425: ----------------------------------------- Author: ASF GitHub Bot Created on: 15/Jun/21 04:25 Start Date: 15/Jun/21 04:25 Worklog Time Spent: 10m Work Description: nrg4878 commented on a change in pull request #2393: URL: https://github.com/apache/hive/pull/2393#discussion_r651437672 ########## File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java ########## @@ -2381,8 +2381,8 @@ private void create_table_core(final RawStore ms, final CreateTableRequest req) Database db = get_database_core(tbl.getCatName(), tbl.getDbName()); if (db != null && db.getType().equals(DatabaseType.REMOTE)) { - DataConnectorProviderFactory.getDataConnectorProvider(db).createTable(tbl); - return; + // HIVE-24396: Create table in REMOTE db should fail + throw new MetaException("Create table in REMOTE database " + db.getName() + " is not allowed"); Review comment: This exception is not seen in the test failure above. I expect this to be the root cause of the failure not "Could not instantiate a provider for database" ########## File path: ql/src/test/results/clientnegative/createTbl_remoteDB_fail.q.out ########## @@ -0,0 +1,42 @@ +PREHOOK: query: CREATE CONNECTOR IF NOT EXISTS mysql_test +TYPE 'mysql' +URL 'jdbc:mysql://nightly1.apache.org:3306/hive1' +COMMENT 'test connector' +WITH DCPROPERTIES ( +"hive.sql.dbcp.username"="hive1", +"hive.sql.dbcp.password"="hive1") +PREHOOK: type: CREATEDATACONNECTOR +PREHOOK: Output: connector:mysql_test +POSTHOOK: query: CREATE CONNECTOR IF NOT EXISTS mysql_test +TYPE 'mysql' +URL 'jdbc:mysql://nightly1.apache.org:3306/hive1' +COMMENT 'test connector' +WITH DCPROPERTIES ( +"hive.sql.dbcp.username"="hive1", +"hive.sql.dbcp.password"="hive1") +POSTHOOK: type: CREATEDATACONNECTOR +POSTHOOK: Output: connector:mysql_test +PREHOOK: query: SHOW CONNECTORS +PREHOOK: type: SHOWDATACONNECTORS +POSTHOOK: query: SHOW CONNECTORS +POSTHOOK: type: SHOWDATACONNECTORS +mysql_test +PREHOOK: query: CREATE REMOTE database mysql_db using mysql_test with DBPROPERTIES("connector.remoteDbName"="hive1") +PREHOOK: type: CREATEDATABASE +PREHOOK: Output: database:mysql_db +#### A masked pattern was here #### +POSTHOOK: query: CREATE REMOTE database mysql_db using mysql_test with DBPROPERTIES("connector.remoteDbName"="hive1") +POSTHOOK: type: CREATEDATABASE +POSTHOOK: Output: database:mysql_db +#### A masked pattern was here #### +PREHOOK: query: USE mysql_db +PREHOOK: type: SWITCHDATABASE +PREHOOK: Input: database:mysql_db +POSTHOOK: query: USE mysql_db +POSTHOOK: type: SWITCHDATABASE +POSTHOOK: Input: database:mysql_db +PREHOOK: query: create table bees (id int, name string) +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:mysql_db +PREHOOK: Output: mysql_db@bees +FAILED: Execution Error, return code 40000 from org.apache.hadoop.hive.ql.ddl.DDLTask. MetaException(message:Could not instantiate a provider for database mysql_db) Review comment: So this exception seems to be different from the code below. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 611136) Time Spent: 20m (was: 10m) > Create table in REMOTE db should fail > ------------------------------------- > > Key: HIVE-24425 > URL: https://issues.apache.org/jira/browse/HIVE-24425 > Project: Hive > Issue Type: Sub-task > Reporter: Naveen Gangam > Assignee: Dantong Dong > Priority: Major > Labels: pull-request-available > Time Spent: 20m > Remaining Estimate: 0h > > Currently it creates the table in that DB but show tables does not show > anything. Preventing the creation of table will resolve this inconsistency > too. -- This message was sent by Atlassian Jira (v8.3.4#803005)