public static HiveAuthorizationTranslator getAuthorizationTranslator(HiveAuthorizer authorizer)
      throws HiveAuthzPluginException {
    if (authorizer.getHiveAuthorizationTranslator() == null) {
      return DEFAULT_AUTHORIZATION_TRANSLATOR;
    } else {
      return (HiveAuthorizationTranslator)authorizer.getHiveAuthorizationTranslator();
    }
  }
Common utilities for Privilege related ddl operations.
ql/src/java/org/apache/hadoop/hive/ql/ddl/privilege/PrivilegeUtils.java