Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-3560

Hive always prints a warning message when using remote metastore

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.10.0
    • Metastore
    • None

    Description

      This issue was discovered in HIVE-2585 and more details about why this issue was filed are available there.

      Currently if one sets hive.metastore.uris the following error will always be displayed:

      2012-07-24 15:23:58,647 [main] WARN org.apache.hadoop.hive.conf.HiveConf - DEPRECATED: Configuration property hive.metastore.local no longer has any effect. Make sure to provide a valid value for hive.metastore.uris if you are connecting to a remote metastore.
      

      The reason is javax.jdo.option.ConnectionURL has a default value and will never be null. I set this property in hive-site.xml and walked through the configuration loading in a debugger. If the value is not empty it takes effect, and is ignored if empty.

      Since javax.jdo.option.ConnectionURL has a default and cannot be unset, this warning will always be printed if someone sets hive.metastore.uris.

      Per the review comments, the error message was added to reduce user confusion, and prevent surprises by using the wrong metastore (either embedded or remote). In HiveMetaStoreClient.java we see a very clear info message printed saying that a remote metastore is used.

      LOG.info("Trying to connect to metastore with URI " + store);
      ...
      LOG.info("Connected to metastore.");
      

      Since we clearly communicate to the user that a remote metastore at the given URI is being used we'll remove that message. Additionally, to further clarify a remote metastore is used I'll make the following HiveMetaStoreClient logging change:

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

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

      Attachments

        1. HIVE-3560_logging_tweaks.1.patch
          3 kB
          Travis Crawford
        2. HIVE-3560_logging_tweaks.2.patch
          3 kB
          Travis Crawford

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            traviscrawford Travis Crawford Assign to me
            traviscrawford Travis Crawford
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment