Tabnine Logo
MSentryRole.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.sentry.provider.db.service.model.MSentryRole
constructor

Best Java code snippets using org.apache.sentry.provider.db.service.model.MSentryRole.<init> (Showing top 15 results out of 315)

origin: apache/sentry

private void createRoleIfNotExist(PersistenceManager pm,
  Set<String> existRoleNames, String roleName) throws Exception {
 String lowerRoleName = trimAndLower(roleName);
 // if the rolenName doesn't exist, create it.
 if (!existRoleNames.contains(lowerRoleName)) {
  // update the exist role name set
  existRoleNames.add(lowerRoleName);
  // Create role in the persistent storage
  pm.makePersistent(new MSentryRole(trimAndLower(roleName)));
 }
}
origin: apache/incubator-sentry

private void createSentryRoleCore(PersistenceManager pm, String roleName)
  throws SentryAlreadyExistsException {
 MSentryRole mSentryRole = getMSentryRole(pm, roleName);
 if (mSentryRole == null) {
  MSentryRole mRole = new MSentryRole(roleName, System.currentTimeMillis());
  pm.makePersistent(mRole);
 } else {
  throw new SentryAlreadyExistsException("Role: " + roleName);
 }
}
origin: apache/sentry

/**
 * Create a sentry role and persist it. Role name is the primary key for the
 * role, so an attempt to create a role which exists fails with JDO exception.
 *
 * @param roleName: Name of the role being persisted.
 *    The name is normalized.
 * @throws Exception
 */
public void createSentryRole(final String roleName) throws Exception {
 tm.executeTransactionWithRetry(
     pm -> {
      pm.setDetachAllOnCommit(false); // No need to detach objects
      String trimmedRoleName = trimAndLower(roleName);
      if (getRole(pm, trimmedRoleName) != null) {
       throw new SentryAlreadyExistsException("Role: " + trimmedRoleName);
      }
      pm.makePersistent(new MSentryRole(trimmedRoleName));
      return null;
      });
}
origin: apache/incubator-sentry

SearchConstants.QUERY, true);
MSentryRole role = new MSentryRole("r1", 290);
mSentryGMPrivilege.setRoles(Sets.newHashSet(role));
origin: apache/sentry

SolrConstants.QUERY, true);
MSentryRole role = new MSentryRole("r1", 290);
mSentryGMPrivilege.setRoles(Sets.newHashSet(role));
origin: apache/incubator-sentry

pm.makePersistent(new MSentryRole(roleName, System.currentTimeMillis()));
commitTransaction(pm);
origin: apache/sentry

pm.makePersistent(new MSentryRole(roleName, System.currentTimeMillis()));
commitTransaction(pm);
origin: apache/sentry

pm.makePersistent(new MSentryRole(roleName, System.currentTimeMillis()));
commitTransaction(pm);
origin: apache/sentry

pm.makePersistent(new MSentryRole(roleName, System.currentTimeMillis()));
commitTransaction(pm);
origin: apache/sentry

pm.makePersistent(new MSentryRole(roleName1, System.currentTimeMillis()));
commitTransaction(pm);
pm.makePersistent(new MSentryRole(roleName2, System.currentTimeMillis()));
commitTransaction(pm);
origin: apache/incubator-sentry

pm.makePersistent(new MSentryRole(roleName, System.currentTimeMillis()));
commitTransaction(pm);
origin: apache/incubator-sentry

pm.makePersistent(new MSentryRole(roleName, System.currentTimeMillis()));
commitTransaction(pm);
origin: apache/incubator-sentry

pm.makePersistent(new MSentryRole(roleName, System.currentTimeMillis()));
commitTransaction(pm);
origin: apache/sentry

pm.makePersistent(new MSentryRole(roleName, System.currentTimeMillis()));
commitTransaction(pm);
origin: apache/sentry

pm.makePersistent(new MSentryRole(roleName, System.currentTimeMillis()));
commitTransaction(pm);
org.apache.sentry.provider.db.service.modelMSentryRole<init>

Popular methods of MSentryRole

  • getGmPrivileges
  • getGroups
  • getPrivileges
  • removeGMPrivileges
  • removePrivileges
  • getRoleName
  • appendGMPrivilege
  • appendGroup
  • getUsers
  • removeGMPrivilege
  • removeGroup
  • appendPrivilege
  • removeGroup,
  • appendPrivilege,
  • appendUser,
  • removePrivilege,
  • removeUser

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • JList (javax.swing)
  • JTable (javax.swing)
  • Option (scala)
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now