[
https://issues.apache.org/jira/browse/HIVE-24120?focusedWorklogId=828113&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-828113
]
ASF GitHub Bot logged work on HIVE-24120:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Nov/22 17:38
Start Date: 22/Nov/22 17:38
Worklog Time Spent: 10m
Work Description: saihemanth-cloudera commented on code in PR #3799:
URL: https://github.com/apache/hive/pull/3799#discussion_r1029644007
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DatabaseProduct.java:
##########
@@ -93,10 +100,6 @@ public static DatabaseProduct
determineDatabaseProduct(String productName,
// Check for null again in case of race condition
if (theDatabaseProduct == null) {
- Preconditions.checkNotNull(conf, "Configuration is null");
Review Comment:
Shouldn't we check this for race conditions/concurrent connections?
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DatabaseProduct.java:
##########
@@ -77,8 +77,15 @@ public static DatabaseProduct
determineDatabaseProduct(String productName,
Configuration conf) {
DbType dbt;
+ // Check if we are using an external database product
+ boolean isExternal = MetastoreConf.getBoolVar(conf,
ConfVars.USE_CUSTOM_RDBMS);
+
if (theDatabaseProduct != null) {
- Preconditions.checkState(theDatabaseProduct.dbType ==
getDbType(productName));
+ dbt = getDbType(productName);
+ if (isExternal) {
+ dbt = DbType.CUSTOM;
+ }
+ Preconditions.checkState(theDatabaseProduct.dbType == dbt);
Review Comment:
I wonder this
[test](https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/txn/TestTxnUtils.java#L262)
would fail after this change.
Issue Time Tracking
-------------------
Worklog Id: (was: 828113)
Time Spent: 3.5h (was: 3h 20m)
> Plugin for external DatabaseProduct in standalone HMS
> -----------------------------------------------------
>
> Key: HIVE-24120
> URL: https://issues.apache.org/jira/browse/HIVE-24120
> Project: Hive
> Issue Type: Improvement
> Components: Standalone Metastore
> Affects Versions: 3.1.1
> Reporter: Gustavo Arocena
> Assignee: Gustavo Arocena
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.0.0-alpha-1
>
> Attachments: External database support.pdf
>
> Time Spent: 3.5h
> Remaining Estimate: 0h
>
> Add a pluggable way to support ANSI compliant databases as backends for
> standalone HMS
--
This message was sent by Atlassian Jira
(v8.20.10#820010)