----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31249/#review73950 -----------------------------------------------------------
metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java <https://reviews.apache.org/r/31249/#comment120366> this logging statement is invalid now it appears - Sergey Shelukhin On Feb. 24, 2015, 10:34 p.m., XIAOBING ZHOU wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31249/ > ----------------------------------------------------------- > > (Updated Feb. 24, 2015, 10:34 p.m.) > > > Review request for hive. > > > Repository: hive-git > > > 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(…) > > > Diffs > ----- > > metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java > 574141c > > Diff: https://reviews.apache.org/r/31249/diff/ > > > Testing > ------- > > > Thanks, > > XIAOBING ZHOU > >