congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.apache.sentry.provider.db.generic.service.persistent
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.sentry.provider.db.generic.service.persistent

Best Java code snippets using org.apache.sentry.provider.db.generic.service.persistent (Showing top 20 results out of 315)

origin: apache/sentry

public void grantPrivilege(PrivilegeObject privilege,MSentryRole role, PersistenceManager pm) throws SentryUserException {
 MSentryGMPrivilege mPrivilege = convertToPrivilege(privilege);
 grantRolePartial(mPrivilege, role, pm);
}
origin: apache/sentry

private MSentryGMPrivilege convertToPrivilege(PrivilegeObject privilege) {
 return new MSentryGMPrivilege(privilege.getComponent(),
   privilege.getService(), privilege.getAuthorizables(),
   privilege.getAction(), privilege.getGrantOption());
}
origin: apache/sentry

 public PrivilegeObject build() {
  Preconditions.checkNotNull(component);
  Preconditions.checkNotNull(service);
  Preconditions.checkNotNull(action);
  //CaseInsensitive authorizable name
  List<? extends Authorizable> newAuthorizable = toLowerAuthorizableName(authorizables);
  return new PrivilegeObject(component.toLowerCase(),
                  service.toLowerCase(),
                  action.toLowerCase(),
                  grantOption,
                  newAuthorizable);
 }
}
origin: apache/incubator-sentry

@BeforeClass
public static void setup() throws Exception {
 conf = new Configuration(false);
 setup(conf);
 sentryStore = new DelegateSentryStore(conf);
}
origin: apache/sentry

@Override
public List<? extends BitFieldAction> getActionsByCode(int actionCode) {
 List<MyComponentAction> actions = Lists.newArrayList();
 for (MyComponentActionType action : MyComponentActionType.getActionByCode(actionCode)) {
  actions.add(new MyComponentAction(action));
 }
 return actions;
}
origin: apache/sentry

@Override
public Object alterRoleDeleteGroups(String component, String role,
  Set<String> groups, String requestor) throws Exception {
 delegate.alterSentryRoleDeleteGroups(role, toTSentryGroups(groups));
 return null;
}
origin: apache/incubator-sentry

public MyComponentAction(String name) {
 this(MyComponentActionType.getActionByName(name));
}
public MyComponentAction(MyComponentActionType myComponentActionType) {
origin: apache/sentry

/**
 * Grant query privilege to role r1
 */
@Test
public void testGrantPrivilege() throws Exception {
 testGrantPrivilege(sentryStore, SEARCH);
}
origin: apache/sentry

 @Override
 public BitFieldAction getActionByName(String name) {
  // Check the name is All
  if (SqoopActionConstant.ALL_NAME.equalsIgnoreCase(name)) {
   return new MyComponentAction(MyComponentActionType.ALL);
  }
  return new MyComponentAction(name);
 }
}
origin: apache/sentry

@Test(expected=Exception.class)
public void testCreateDuplicateRole() throws Exception {
 String roleName = "test-dup-role";
 String grantor = "grantor";
 sentryStore.createRole(SEARCH, roleName, grantor);
 sentryStore.createRole(SEARCH, roleName, grantor);
}
origin: apache/incubator-sentry

@Test(expected=SentryNoSuchObjectException.class)
public void testDropNotExistRole() throws Exception {
 String roleName = "not-exist";
 String grantor = "grantor";
 sentryStore.dropRole(SEARCH, roleName, grantor);
}
origin: apache/incubator-sentry

private MSentryGMPrivilege convertToPrivilege(PrivilegeObject privilege) {
 return new MSentryGMPrivilege(privilege.getComponent(),
   privilege.getService(), privilege.getAuthorizables(),
   privilege.getAction(), privilege.getGrantOption());
}
origin: apache/sentry

@BeforeClass
public static void setup() throws Exception {
 conf = new Configuration(true);
 setup(conf);
 sentryStore = new DelegateSentryStore(conf);
}
origin: apache/incubator-sentry

public void grantPrivilege(PrivilegeObject privilege,MSentryRole role, PersistenceManager pm) throws SentryUserException {
 MSentryGMPrivilege mPrivilege = convertToPrivilege(privilege);
 grantRolePartial(mPrivilege, role, pm);
}
origin: apache/incubator-sentry

@Override
public List<? extends BitFieldAction> getActionsByCode(int actionCode) {
 List<MyComponentAction> actions = Lists.newArrayList();
 for (MyComponentActionType action : MyComponentActionType.getActionByCode(actionCode)) {
  actions.add(new MyComponentAction(action));
 }
 return actions;
}
origin: apache/incubator-sentry

 public PrivilegeObject build() {
  Preconditions.checkNotNull(component);
  Preconditions.checkNotNull(service);
  Preconditions.checkNotNull(action);
  //CaseInsensitive authorizable name
  List<? extends Authorizable> newAuthorizable = toLowerAuthorizableName(authorizables);
  return new PrivilegeObject(component.toLowerCase(),
                  service.toLowerCase(),
                  action.toLowerCase(),
                  grantOption,
                  newAuthorizable);
 }
}
origin: apache/sentry

@Override
public Object alterRoleAddGroups(String component, String role,
  Set<String> groups, String requestor) throws Exception {
 delegate.alterSentryRoleAddGroups(requestor, role, toTSentryGroups(groups));
 return null;
}
origin: apache/sentry

public MyComponentAction(String name) {
 this(MyComponentActionType.getActionByName(name));
}
public MyComponentAction(MyComponentActionType myComponentActionType) {
origin: apache/incubator-sentry

/**
 * Grant query privilege to role r1
 */
@Test
public void testGrantPrivilege() throws Exception {
 testGrantPrivilege(sentryStore, SEARCH);
}
origin: apache/incubator-sentry

@Override
public CommitContext alterRoleDeleteGroups(String component, String role,
  Set<String> groups, String requestor) throws SentryNoSuchObjectException {
//called to old sentryStore
 return delegate.alterSentryRoleDeleteGroups(role, toTSentryGroups(groups));
}
org.apache.sentry.provider.db.generic.service.persistent

Most used classes

  • DelegateSentryStore
    The DelegateSentryStore will supports the generic authorizable model. It stores the authorizables in
  • PrivilegeObject$Builder
  • SentryStoreLayer
    Sentry store for persistent the authorize object to database
  • PrivilegeObject
  • PrivilegeOperatePersistence
    This class used do some operations related privilege and make the results persistence
  • TestDelegateSentryStore,
  • TestPrivilegeOperatePersistence$MyComponentActionFactory$MyComponentAction,
  • TestPrivilegeOperatePersistence$MyComponentActionFactory$MyComponentActionType,
  • TestPrivilegeOperatePersistence,
  • TestSentryRole
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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