Examples of PrivilegeScope


Examples of org.apache.sentry.service.thrift.ServiceConstants.PrivilegeScope

    String serverName = safeTrimLower(privilege.getServerName());
    String dbName = safeTrimLower(privilege.getDbName());
    String tableName = safeTrimLower(privilege.getTableName());
    String uri = privilege.getURI();
    String action = safeTrimLower(privilege.getAction());
    PrivilegeScope scope;

    if (serverName == null) {
      throw new SentryInvalidInputException("Server name is null");
    }
View Full Code Here

Examples of org.apache.sentry.service.thrift.ServiceConstants.PrivilegeScope

    tSentryPrivilege.setDbName(tAuthorizable.getDb());
    tSentryPrivilege.setServerName(tAuthorizable.getServer());
    tSentryPrivilege.setTableName(tAuthorizable.getTable());
    tSentryPrivilege.setURI(tAuthorizable.getUri());
    tSentryPrivilege.setGrantorPrincipal(grantorPrincipal);
    PrivilegeScope scope;
    if (tSentryPrivilege.getTableName() != null) {
      scope = PrivilegeScope.TABLE;
    } else if (tSentryPrivilege.getDbName() != null) {
      scope = PrivilegeScope.DATABASE;
    } else if (tSentryPrivilege.getURI() != null) {
      scope = PrivilegeScope.URI;
    } else {
      scope = PrivilegeScope.SERVER;
    }
    tSentryPrivilege.setPrivilegeScope(scope.name());
    tSentryPrivilege.setAction(AccessConstants.ALL);
    return tSentryPrivilege;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.