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

How to use
setColumnName
method
in
org.apache.sentry.provider.db.service.thrift.TSentryPrivilege

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

origin: apache/incubator-sentry

public static TSentryPrivilege convertToTSentryPrivilege(String privilegeStr) {
 TSentryPrivilege tSentryPrivilege = new TSentryPrivilege();
 for (String authorizable : PolicyConstants.AUTHORIZABLE_SPLITTER.split(privilegeStr)) {
  KeyValue tempKV = new KeyValue(authorizable);
  String key = tempKV.getKey();
  String value = tempKV.getValue();
  if (PolicyFileConstants.PRIVILEGE_SERVER_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setServerName(value);
  } else if (PolicyFileConstants.PRIVILEGE_DATABASE_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setDbName(value);
  } else if (PolicyFileConstants.PRIVILEGE_TABLE_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setTableName(value);
  } else if (PolicyFileConstants.PRIVILEGE_COLUMN_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setColumnName(value);
  } else if (PolicyFileConstants.PRIVILEGE_URI_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setURI(value);
  } else if (PolicyFileConstants.PRIVILEGE_ACTION_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setAction(value);
  } else if (PolicyFileConstants.PRIVILEGE_GRANT_OPTION_NAME.equalsIgnoreCase(key)) {
   TSentryGrantOption grantOption = "true".equalsIgnoreCase(value) ? TSentryGrantOption.TRUE
     : TSentryGrantOption.FALSE;
   tSentryPrivilege.setGrantOption(grantOption);
  }
 }
 tSentryPrivilege.setPrivilegeScope(getPrivilegeScope(tSentryPrivilege));
 return tSentryPrivilege;
}
origin: apache/incubator-sentry

public static TSentryPrivilege convertToTSentryPrivilege(String privilegeStr) throws Exception {
 TSentryPrivilege tSentryPrivilege = new TSentryPrivilege();
 for (String authorizable : PolicyConstants.AUTHORIZABLE_SPLITTER.split(privilegeStr)) {
  KeyValue tempKV = new KeyValue(authorizable);
  String key = tempKV.getKey();
  String value = tempKV.getValue();
  if (PolicyFileConstants.PRIVILEGE_SERVER_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setServerName(value);
  } else if (PolicyFileConstants.PRIVILEGE_DATABASE_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setDbName(value);
  } else if (PolicyFileConstants.PRIVILEGE_TABLE_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setTableName(value);
  } else if (PolicyFileConstants.PRIVILEGE_COLUMN_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setColumnName(value);
  } else if (PolicyFileConstants.PRIVILEGE_URI_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setURI(value);
  } else if (PolicyFileConstants.PRIVILEGE_ACTION_NAME.equalsIgnoreCase(key)) {
   tSentryPrivilege.setAction(value);
  } else if (PolicyFileConstants.PRIVILEGE_GRANT_OPTION_NAME.equalsIgnoreCase(key)) {
   TSentryGrantOption grantOption = "true".equalsIgnoreCase(value) ? TSentryGrantOption.TRUE
       : TSentryGrantOption.FALSE;
   tSentryPrivilege.setGrantOption(grantOption);
  }
 }
 tSentryPrivilege.setPrivilegeScope(getPrivilegeScope(tSentryPrivilege));
 validatePrivilegeHierarchy(tSentryPrivilege);
 return tSentryPrivilege;
}
origin: apache/incubator-sentry

private Set<TSentryPrivilege> convertColumnPrivilege(
  PrivilegeScope scope, String serverName, String uri, String db, String table, String column,
  String action, Boolean grantOption) {
 ImmutableSet.Builder<TSentryPrivilege> setBuilder = ImmutableSet.builder();
 TSentryPrivilege privilege = new TSentryPrivilege();
 privilege.setPrivilegeScope(scope.toString());
 privilege.setServerName(serverName);
 privilege.setURI(uri);
 privilege.setDbName(db);
 privilege.setTableName(table);
 privilege.setColumnName(column);
 privilege.setAction(action);
 privilege.setCreateTime(System.currentTimeMillis());
 privilege.setGrantOption(convertTSentryGrantOption(grantOption));
 setBuilder.add(privilege);
 return setBuilder.build();
}
origin: apache/incubator-sentry

privilege.setDbName(db);
privilege.setTableName(table);
privilege.setColumnName(null);
privilege.setAction(action);
privilege.setCreateTime(System.currentTimeMillis());
 privilege.setDbName(db);
 privilege.setTableName(table);
 privilege.setColumnName(column);
 privilege.setAction(action);
 privilege.setCreateTime(System.currentTimeMillis());
origin: apache/incubator-sentry

tSentryPrivilege.setDbName(dbName);
tSentryPrivilege.setTableName(table);
tSentryPrivilege.setColumnName(column);
sentryStore.alterSentryRoleGrantPrivilege(grantor, roleName, tSentryPrivilege);
origin: apache/incubator-sentry

private void convertToTSentryPrivilege(MSentryPrivilege mSentryPrivilege,
  TSentryPrivilege privilege) {
 privilege.setCreateTime(mSentryPrivilege.getCreateTime());
 privilege.setAction(fromNULLCol(mSentryPrivilege.getAction()));
 privilege.setPrivilegeScope(mSentryPrivilege.getPrivilegeScope());
 privilege.setServerName(fromNULLCol(mSentryPrivilege.getServerName()));
 privilege.setDbName(fromNULLCol(mSentryPrivilege.getDbName()));
 privilege.setTableName(fromNULLCol(mSentryPrivilege.getTableName()));
 privilege.setColumnName(fromNULLCol(mSentryPrivilege.getColumnName()));
 privilege.setURI(fromNULLCol(mSentryPrivilege.getURI()));
 if (mSentryPrivilege.getGrantOption() != null) {
  privilege.setGrantOption(TSentryGrantOption.valueOf(mSentryPrivilege.getGrantOption().toString().toUpperCase()));
 } else {
  privilege.setGrantOption(TSentryGrantOption.UNSET);
 }
}
origin: apache/incubator-sentry

privilege_tbl1_c1.setColumnName("c1");
privilege_tbl1_c1.setCreateTime(System.currentTimeMillis());
privilege_tbl1_c2.setColumnName("c2");
privilege_tbl1_c2.setCreateTime(System.currentTimeMillis());
privilege_tbl1_c3.setColumnName("c3");
privilege_tbl1_c3.setCreateTime(System.currentTimeMillis());
origin: apache/incubator-sentry

private TSentryPrivilege createTSentryPrivilege(String scope, String server, String dbName,
  String tableName, String columnName, String uri, String action, TSentryGrantOption grantOption) {
 TSentryPrivilege tSentryPrivilege = new TSentryPrivilege();
 tSentryPrivilege.setPrivilegeScope(scope);
 tSentryPrivilege.setServerName(server);
 tSentryPrivilege.setDbName(dbName);
 tSentryPrivilege.setTableName(tableName);
 tSentryPrivilege.setColumnName(columnName);
 tSentryPrivilege.setURI(uri);
 tSentryPrivilege.setAction(action);
 tSentryPrivilege.setGrantOption(grantOption);
 return tSentryPrivilege;
}
origin: apache/incubator-sentry

privilege_tbl1_c1.setColumnName("c1");
privilege_tbl1_c1.setCreateTime(System.currentTimeMillis());
privilege_tbl1_c2.setColumnName("c2");
privilege_tbl1_c2.setCreateTime(System.currentTimeMillis());
privilege_tbl1_c3.setColumnName("c3");
privilege_tbl1_c3.setCreateTime(System.currentTimeMillis());
origin: apache/incubator-sentry

privilege.setDbName(db);
privilege.setTableName(table);
privilege.setColumnName(column);
privilege.setAction(AccessConstants.SELECT);
privilege.setCreateTime(System.currentTimeMillis());
privilege.setDbName(db);
privilege.setTableName(table);
privilege.setColumnName(columns[i]);
privilege.setAction(AccessConstants.SELECT);
privilege.setCreateTime(System.currentTimeMillis());
origin: apache/incubator-sentry

privilege2.setDbName(db);
privilege2.setTableName(table);
privilege2.setColumnName(column);
privilege2.setAction(AccessConstants.SELECT);
privilege2.setCreateTime(System.currentTimeMillis());
origin: apache/incubator-sentry

 unsetColumnName();
} else {
 setColumnName((String)value);
origin: apache/incubator-sentry

privilege.setDbName(db);
privilege.setTableName(table);
privilege.setColumnName(column1);
privilege.setAction(AccessConstants.ALL);
privilege.setCreateTime(System.currentTimeMillis());
privilege.setColumnName(column2);
assertEquals(seqId + 2, sentryStore.alterSentryRoleGrantPrivilege(grantor, roleName, privilege)
  .getSequenceId());
origin: apache/incubator-sentry

private TSentryPrivilege toSentryPrivilege(TSentryAuthorizable tAuthorizable)
  throws SentryInvalidInputException {
 TSentryPrivilege tSentryPrivilege = new TSentryPrivilege();
 tSentryPrivilege.setDbName(fromNULLCol(tAuthorizable.getDb()));
 tSentryPrivilege.setServerName(fromNULLCol(tAuthorizable.getServer()));
 tSentryPrivilege.setTableName(fromNULLCol(tAuthorizable.getTable()));
 tSentryPrivilege.setColumnName(fromNULLCol(tAuthorizable.getColumn()));
 tSentryPrivilege.setURI(fromNULLCol(tAuthorizable.getUri()));
 PrivilegeScope scope;
 if (!isNULL(tSentryPrivilege.getColumnName())) {
  scope = PrivilegeScope.COLUMN;
 } else if (!isNULL(tSentryPrivilege.getTableName())) {
  scope = PrivilegeScope.TABLE;
 } else if (!isNULL(tSentryPrivilege.getDbName())) {
  scope = PrivilegeScope.DATABASE;
 } else if (!isNULL(tSentryPrivilege.getURI())) {
  scope = PrivilegeScope.URI;
 } else {
  scope = PrivilegeScope.SERVER;
 }
 tSentryPrivilege.setPrivilegeScope(scope.name());
 tSentryPrivilege.setAction(AccessConstants.ALL);
 return tSentryPrivilege;
}
origin: apache/incubator-sentry

privilegeCol1.setDbName(db);
privilegeCol1.setTableName(table);
privilegeCol1.setColumnName(column1);
privilegeCol1.setAction(AccessConstants.ALL);
privilegeCol1.setCreateTime(System.currentTimeMillis());
TSentryPrivilege privilegeCol2 = privilegeCol1.deepCopy();
privilegeCol2.setColumnName(column2);
org.apache.sentry.provider.db.service.thriftTSentryPrivilegesetColumnName

Popular methods of TSentryPrivilege

  • getAction
  • getDbName
  • getPrivilegeScope
  • getTableName
  • getColumnName
  • getGrantOption
  • getURI
  • <init>
    Performs a deep copy on other.
  • getCreateTime
  • getServerName
  • isSetAction
    Returns true if field action is set (has been assigned a value) and false otherwise
  • isSetColumnName
    Returns true if field columnName is set (has been assigned a value) and false otherwise
  • isSetAction,
  • isSetColumnName,
  • isSetDbName,
  • isSetGrantOption,
  • isSetPrivilegeScope,
  • isSetServerName,
  • isSetTableName,
  • isSetURI,
  • setAction

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Permission (java.security)
    Legacy security code; do not use.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Top PhpStorm plugins
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