[
https://issues.apache.org/jira/browse/HIVE-18906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16462273#comment-16462273
]
Antal Sinkovits commented on HIVE-18906:
----------------------------------------
Thanks for the answers [~belugabehr]
1. The current implementation executes a test query, to determine whether it
supports direct sql or not. See:
https://github.com/apache/hive/blob/master/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java#L182
Not sure why it was implemented that way, it might be a good idea, to use the
database type instead, but I think we shouldn't mix the two, as it creates
ambiguity.
As this enhancement might be a good idea (even enhance performance as well), I
do feel, that its over the scope of this jira.
2. It seems so to me. This is what the doc says, and the related jira. I've
also did a bit of a smoke test, by running two beeline, changing the config in
one of them and checking the value in both.
I will use the described approach.
Docs/jira/commands:
https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.metastore.try.direct.sql
https://issues.apache.org/jira/browse/HIVE-7532
set metaconf:hive.metastore.try.direct.sql=false;
set metaconf:hive.metastore.try.direct.sql;
3. Yes this makes sense, but in this case, we have the same issue as in 1.
4. Ok, this is also fine then.
> Lower Logging for "Using direct SQL"
> ------------------------------------
>
> Key: HIVE-18906
> URL: https://issues.apache.org/jira/browse/HIVE-18906
> Project: Hive
> Issue Type: Improvement
> Reporter: BELUGA BEHR
> Assignee: Antal Sinkovits
> Priority: Trivial
> Labels: noob
>
> https://github.com/apache/hive/blob/4047befe48c8f762c58d8854e058385c1df151c6/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java#L181
> {code}
> 2018-02-26 14:32:50,620 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-199]:
> Using direct SQL, underlying DB is MYSQL
> 2018-02-26 14:33:09,566 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-172]:
> Using direct SQL, underlying DB is MYSQL
> 2018-02-26 14:33:43,170 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-172]:
> Using direct SQL, underlying DB is MYSQL
> 2018-02-26 14:33:46,301 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-199]:
> Using direct SQL, underlying DB is MYSQL
> 2018-02-26 14:34:16,966 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-172]:
> Using direct SQL, underlying DB is MYSQL
> 2018-02-26 14:34:18,072 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-196]:
> Using direct SQL, underlying DB is MYSQL
> 2018-02-26 14:34:25,064 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-199]:
> Using direct SQL, underlying DB is MYSQL
> 2018-02-26 14:34:51,781 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-172]:
> Using direct SQL, underlying DB is MYSQL
> 2018-02-26 14:35:04,685 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-199]:
> Using direct SQL, underlying DB is MYSQL
> 2018-02-26 14:35:26,689 INFO
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql: [pool-4-thread-172]:
> Using direct SQL, underlying DB is MYSQL
> {code}
> I wouldn't mind knowing this information when the service starts up and
> detects that there is a Direct SQL compatible database, but I don't need to
> know about this every time.
> Please lower to _debug_ level logging and parameterize with SLF4J. Direct
> SQL is a performance thing and not something I care about during the normal
> course of operation (unless there is an error which would presumably be
> covered by an _error_ logging message).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)