hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiaobing Zhou (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-9741) Refactor MetaStoreDirectSql constructor
Date Mon, 23 Feb 2015 22:08:14 GMT

     [ https://issues.apache.org/jira/browse/HIVE-9741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xiaobing Zhou updated HIVE-9741:
--------------------------------
    Description: 
MetaStoreDirectSql constructor is querying DB to determine dbType, which leads to too many
DB queries to make megastore slow as ObjectStore.setConf might be called frequently. Moreover,
ObjectStore.setConf begins/ends with lock acquire/release, if the underlying DB hangs somehow,
lock is never released and all hereafter incoming requests are blocked.

Two points:
1. Using getProductName based JDBC driver to get dbType info.
2. Since metastore auto-creaton is disabled by default, it'd better bypass ensureDbInit()
and runTestQuery() in order to avoid DB queries within critical section of setConf.

Here’s stack trace:
MetaStoreDirectSql.determineDbType(...)
MetaStoreDirectSql.MetaStoreDirectSql(...)
ObjectStore.initialize(...)
ObjectStore.setConf(…)



  was:
MetaStoreDirectSql constructor is querying DB to determine dbType, which leads to too many
DB queries to make megastore slow as ObjectStore.setConf might be called frequently. Moreover,
ObjectStore.setConf begins/ends with lock acquire/release, if the underlying DB hangs somehow,
lock is never released and all hereafter incoming requests are blocked.

This is to propose using getProductName to get dbType info.

Here’s stack trace:
MetaStoreDirectSql.determineDbType(...)
MetaStoreDirectSql.MetaStoreDirectSql(...)
ObjectStore.initialize(...)
ObjectStore.setConf(…)



> Refactor MetaStoreDirectSql constructor 
> ----------------------------------------
>
>                 Key: HIVE-9741
>                 URL: https://issues.apache.org/jira/browse/HIVE-9741
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 1.0.0
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>         Attachments: HIVE-9741.1.patch, HIVE-9741.2.patch
>
>
> MetaStoreDirectSql constructor is querying DB to determine dbType, which leads to too
many DB queries to make megastore slow as ObjectStore.setConf might be called frequently.
Moreover, ObjectStore.setConf begins/ends with lock acquire/release, if the underlying DB
hangs somehow, lock is never released and all hereafter incoming requests are blocked.
> Two points:
> 1. Using getProductName based JDBC driver to get dbType info.
> 2. Since metastore auto-creaton is disabled by default, it'd better bypass ensureDbInit()
and runTestQuery() in order to avoid DB queries within critical section of setConf.
> Here’s stack trace:
> MetaStoreDirectSql.determineDbType(...)
> MetaStoreDirectSql.MetaStoreDirectSql(...)
> ObjectStore.initialize(...)
> ObjectStore.setConf(…)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message