[ 
https://issues.apache.org/jira/browse/HIVE-2585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472636#comment-13472636
 ] 

Travis Crawford commented on HIVE-2585:
---------------------------------------

Hive clients using a remote metastore via {{hive.metastore.uris}} works 
correctly, however, this error message is always printed because AFAICT its not 
possible null out {{javax.jdo.option.ConnectionURL}} from {{hive-site.xml}}.

Looking through the comments on this patch, the error message was intended to 
reduce user confusion, a goal I totally support. In 
[HiveMetaStoreClient.java|https://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java]
 we see a very clear info message printed saying that a remote metastore is 
used.

{code:title=HiveMetaStoreClient.java logs that a remote metastore is used}
LOG.info("Trying to connect to metastore with URI " + store);
...
LOG.info("Connected to metastore.");
{code}

Since we clearly communicate to the user that a remote metastore at the given 
URI is being used, is this warning needed? I'd be happy to submit a patch that 
removes the above warning message, and makes the following HiveMetaStoreClient 
logging change:

{code}
LOG.debug("Trying to connect to remote HiveMetaStore: " + store);
...
LOG.info("Connected to remote HiveMetaStore: " + store);
{code}

The change is at debug level we print connection attempts, and always print 
which remote HiveMetaStore we actually connected to.

Thoughts? If this sounds good I'll file a related issue and submit the patch.
                
> Collapse hive.metastore.uris and hive.metastore.local
> -----------------------------------------------------
>
>                 Key: HIVE-2585
>                 URL: https://issues.apache.org/jira/browse/HIVE-2585
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>             Fix For: 0.10.0
>
>         Attachments: ASF.LICENSE.NOT.GRANTED--HIVE-2585.D2559.1.patch, 
> ASF.LICENSE.NOT.GRANTED--HIVE-2585.D2559.2.patch, hive-2585_3.patch
>
>
> We should just have hive.metastore.uris. If it is empty, we shall assume 
> local mode, if non-empty we shall use that string to connect to remote 
> metastore. Having two different keys for same information is confusing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to