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

Misleading "METASTORE_FILTER_HOOK will be ignored" warning from SessionState

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.0
    • 4.0.0-alpha-1
    • HiveServer2
    • None

    Description

      When I run things on my test cluster I see things like this in my logs:

      18/03/14 13:35:20 WARN session.SessionState: METASTORE_FILTER_HOOK will be ignored, since hive.security.authorization.manager is set to instance of HiveAuthorizerFactory.
      18/03/14 13:35:21 WARN session.SessionState: METASTORE_FILTER_HOOK will be ignored, since hive.security.authorization.manager is set to instance of HiveAuthorizerFactory.
      

      That's because the code in SessionState.java is wrong:

          String metastoreHook = sessionConf.get(ConfVars.METASTORE_FILTER_HOOK.name());
          if (!ConfVars.METASTORE_FILTER_HOOK.getDefaultValue().equals(metastoreHook) &&
              !AuthorizationMetaStoreFilterHook.class.getName().equals(metastoreHook)) {
            LOG.warn(ConfVars.METASTORE_FILTER_HOOK.name() +
                " will be ignored, since hive.security.authorization.manager" +
                " is set to instance of HiveAuthorizerFactory.");
          }
      

      It's using .name() which is the enum name, not the actual config key.

      Attachments

        1. HIVE-19888.1.patch
          1 kB
          Marcelo Masiero Vanzin

        Activity

          People

            vanzin Marcelo Masiero Vanzin
            vanzin Marcelo Masiero Vanzin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: