Tabnine Logo
MSentryPrivilege.setColumnName
Code IndexAdd Tabnine to your IDE (free)

How to use
setColumnName
method
in
org.apache.sentry.provider.db.service.model.MSentryPrivilege

Best Java code snippets using org.apache.sentry.provider.db.service.model.MSentryPrivilege.setColumnName (Showing top 15 results out of 315)

origin: apache/incubator-sentry

priv.setDbName((String) privObj[2]);
priv.setTableName((String) privObj[3]);
priv.setColumnName((String) privObj[4]);
priv.setURI((String) privObj[5]);
priv.setAction((String) privObj[6]);
origin: apache/sentry

 @Test
 public void testImpliesPrivilegeNegativeWithColumn() throws Exception {
  // 1.test server+database+table+column+action
  MSentryPrivilege my = new MSentryPrivilege();
  MSentryPrivilege your = new MSentryPrivilege();
  // bad column
  my.setServerName("server1");
  my.setDbName("db1");
  my.setTableName("tb1");
  my.setColumnName("c1");
  my.setAction(AccessConstants.SELECT);
  your.setServerName("server1");
  your.setDbName("db1");
  your.setTableName("tb1");
  your.setColumnName("c2");
  your.setAction(AccessConstants.SELECT);
  assertFalse(my.implies(your));

  // bad scope
  your.setColumnName("");
  assertFalse(my.implies(your));
 }
}
origin: apache/incubator-sentry

 @Test
 public void testImpliesPrivilegeNegativeWithColumn() throws Exception {
  // 1.test server+database+table+column+action
  MSentryPrivilege my = new MSentryPrivilege();
  MSentryPrivilege your = new MSentryPrivilege();
  // bad column
  my.setServerName("server1");
  my.setDbName("db1");
  my.setTableName("tb1");
  my.setColumnName("c1");
  my.setAction(AccessConstants.SELECT);
  your.setServerName("server1");
  your.setDbName("db1");
  your.setTableName("tb1");
  your.setColumnName("c2");
  your.setAction(AccessConstants.SELECT);
  assertFalse(my.implies(your));

  // bad scope
  your.setColumnName("");
  assertFalse(my.implies(your));
 }
}
origin: apache/sentry

/**
 * Converts thrift object to model object. Additionally does normalization
 * such as trimming whitespace and setting appropriate case.
 * @throws SentryInvalidInputException
 */
private MSentryPrivilege convertToMSentryPrivilege(TSentryPrivilege privilege)
  throws SentryInvalidInputException {
 MSentryPrivilege mSentryPrivilege = new MSentryPrivilege();
 mSentryPrivilege.setServerName(toNULLCol(safeTrimLower(privilege.getServerName())));
 mSentryPrivilege.setDbName(toNULLCol(safeTrimLower(privilege.getDbName())));
 mSentryPrivilege.setTableName(toNULLCol(safeTrimLower(privilege.getTableName())));
 mSentryPrivilege.setColumnName(toNULLCol(safeTrimLower(privilege.getColumnName())));
 mSentryPrivilege.setPrivilegeScope(safeTrim(privilege.getPrivilegeScope()));
 mSentryPrivilege.setAction(toNULLCol(safeTrimLower(privilege.getAction())));
 mSentryPrivilege.setCreateTime(System.currentTimeMillis());
 mSentryPrivilege.setURI(toNULLCol(safeTrim(privilege.getURI())));
 if ( !privilege.getGrantOption().equals(TSentryGrantOption.UNSET) ) {
  mSentryPrivilege.setGrantOption(Boolean.valueOf(privilege.getGrantOption().toString()));
 } else {
  mSentryPrivilege.setGrantOption(null);
 }
 return mSentryPrivilege;
}
origin: apache/incubator-sentry

/**
 * Converts thrift object to model object. Additionally does normalization
 * such as trimming whitespace and setting appropriate case.
 * @throws SentryInvalidInputException
 */
private MSentryPrivilege convertToMSentryPrivilege(TSentryPrivilege privilege)
  throws SentryInvalidInputException {
 MSentryPrivilege mSentryPrivilege = new MSentryPrivilege();
 mSentryPrivilege.setServerName(toNULLCol(safeTrimLower(privilege.getServerName())));
 mSentryPrivilege.setDbName(toNULLCol(safeTrimLower(privilege.getDbName())));
 mSentryPrivilege.setTableName(toNULLCol(safeTrimLower(privilege.getTableName())));
 mSentryPrivilege.setColumnName(toNULLCol(safeTrimLower(privilege.getColumnName())));
 mSentryPrivilege.setPrivilegeScope(safeTrim(privilege.getPrivilegeScope()));
 mSentryPrivilege.setAction(toNULLCol(safeTrimLower(privilege.getAction())));
 mSentryPrivilege.setCreateTime(System.currentTimeMillis());
 mSentryPrivilege.setURI(toNULLCol(safeTrim(privilege.getURI())));
 if ( !privilege.getGrantOption().equals(TSentryGrantOption.UNSET) ) {
  mSentryPrivilege.setGrantOption(Boolean.valueOf(privilege.getGrantOption().toString()));
 } else {
  mSentryPrivilege.setGrantOption(null);
 }
 return mSentryPrivilege;
}
private static String safeTrim(String s) {
origin: apache/incubator-sentry

@Test
public void testImpliesPrivilegePositiveWithColumn() throws Exception {
 // 1.test server+database+table+column+action
 MSentryPrivilege my = new MSentryPrivilege();
 MSentryPrivilege your = new MSentryPrivilege();
 my.setServerName("server1");
 my.setAction(AccessConstants.SELECT);
 your.setServerName("server1");
 your.setDbName("db1");
 your.setTableName("tb1");
 your.setColumnName("c1");
 your.setAction(AccessConstants.SELECT);
 assertTrue(my.implies(your));
 my.setDbName("db1");
 assertTrue(my.implies(your));
 my.setTableName("tb1");
 assertTrue(my.implies(your));
 my.setColumnName("c1");
 assertTrue(my.implies(your));
}
origin: apache/sentry

@Test
public void testImpliesPrivilegePositiveWithColumn() throws Exception {
 // 1.test server+database+table+column+action
 MSentryPrivilege my = new MSentryPrivilege();
 MSentryPrivilege your = new MSentryPrivilege();
 my.setServerName("server1");
 my.setAction(AccessConstants.SELECT);
 your.setServerName("server1");
 your.setDbName("db1");
 your.setTableName("tb1");
 your.setColumnName("c1");
 your.setAction(AccessConstants.SELECT);
 assertTrue(my.implies(your));
 my.setDbName("db1");
 assertTrue(my.implies(your));
 my.setTableName("tb1");
 assertTrue(my.implies(your));
 my.setColumnName("c1");
 assertTrue(my.implies(your));
}
origin: apache/sentry

hivePrivilege.setAction("select");
hivePrivilege.setURI(SentryConstants.NULL_COL);
hivePrivilege.setColumnName(SentryConstants.NULL_COL);
hivePrivilege.setGrantOption(true);
origin: apache/incubator-sentry

hivePrivilege.setAction("select");
hivePrivilege.setURI(SentryStore.NULL_COL);
hivePrivilege.setColumnName(SentryStore.NULL_COL);
hivePrivilege.setGrantOption(true);
origin: apache/sentry

hivePrivilege.setAction("select");
hivePrivilege.setURI(SentryConstants.NULL_COL);
hivePrivilege.setColumnName(SentryConstants.NULL_COL);
hivePrivilege.setGrantOption(true);
origin: apache/incubator-sentry

hivePrivilege.setAction("select");
hivePrivilege.setURI(SentryStore.NULL_COL);
hivePrivilege.setColumnName(SentryStore.NULL_COL);
hivePrivilege.setGrantOption(true);
origin: apache/sentry

hivePrivilege.setAction("select");
hivePrivilege.setURI(SentryConstants.NULL_COL);
hivePrivilege.setColumnName(SentryConstants.NULL_COL);
hivePrivilege.setGrantOption(true);
origin: apache/sentry

hivePrivilege.setAction("select");
hivePrivilege.setURI(SentryConstants.NULL_COL);
hivePrivilege.setColumnName(SentryConstants.NULL_COL);
hivePrivilege.setGrantOption(true);
origin: apache/incubator-sentry

hivePrivilege.setAction("select");
hivePrivilege.setURI(SentryStore.NULL_COL);
hivePrivilege.setColumnName(SentryStore.NULL_COL);
hivePrivilege.setGrantOption(true);
origin: apache/sentry

hivePrivilege.setAction("select");
hivePrivilege.setURI(SentryConstants.NULL_COL);
hivePrivilege.setColumnName(SentryConstants.NULL_COL);
hivePrivilege.setGrantOption(true);
org.apache.sentry.provider.db.service.modelMSentryPrivilegesetColumnName

Popular methods of MSentryPrivilege

  • <init>
  • getAction
  • getColumnName
  • getDbName
  • getGrantOption
  • getServerName
  • getTableName
  • implies
    Return true if this privilege implies other privilege Otherwise, return false
  • setAction
  • setDbName
  • setGrantOption
  • setPrivilegeScope
  • setGrantOption,
  • setPrivilegeScope,
  • setServerName,
  • setTableName,
  • setURI,
  • appendPrincipal,
  • appendRole,
  • getCreateTime,
  • getPrivilegeScope

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Best plugins for Eclipse
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