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

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

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

origin: apache/incubator-sentry

public Object getFieldValue(_Fields field) {
 switch (field) {
 case PRIVILEGE_SCOPE:
  return getPrivilegeScope();
 case SERVER_NAME:
  return getServerName();
 case DB_NAME:
  return getDbName();
 case TABLE_NAME:
  return getTableName();
 case URI:
  return getURI();
 case ACTION:
  return getAction();
 case CREATE_TIME:
  return Long.valueOf(getCreateTime());
 case GRANT_OPTION:
  return getGrantOption();
 case COLUMN_NAME:
  return getColumnName();
 }
 throw new IllegalStateException();
}
origin: apache/incubator-sentry

static String writeGrantInfo(Set<TSentryPrivilege> privileges, String roleName) {
 if (privileges == null || privileges.isEmpty()) {
  return "";
 }
 StringBuilder builder = new StringBuilder();
 for (TSentryPrivilege privilege : privileges) {
  if (PrivilegeScope.URI.name().equalsIgnoreCase(
    privilege.getPrivilegeScope())) {
   appendNonNull(builder, privilege.getURI(), true);
  } else if(PrivilegeScope.SERVER.name().equalsIgnoreCase(
    privilege.getPrivilegeScope())) {
   appendNonNull(builder, "*", true);//Db column would show * if it is a server level privilege
  } else {
   appendNonNull(builder, privilege.getDbName(), true);
  }
  appendNonNull(builder, privilege.getTableName());
  appendNonNull(builder, null);//getPartValues()
  appendNonNull(builder, privilege.getColumnName());//getColumnName()
  appendNonNull(builder, roleName);//getPrincipalName()
  appendNonNull(builder, "ROLE");//getPrincipalType()
  appendNonNull(builder, privilege.getAction());
  appendNonNull(builder,
    TSentryGrantOption.TRUE.equals(privilege.getGrantOption()));
  appendNonNull(builder, privilege.getCreateTime() * 1000L);
  appendNonNull(builder, "--");
 }
 LOG.info("builder.toString(): " + builder.toString());
 return builder.toString();
}
org.apache.sentry.provider.db.service.thriftTSentryPrivilegegetCreateTime

Popular methods of TSentryPrivilege

  • getAction
  • getDbName
  • getPrivilegeScope
  • getTableName
  • getColumnName
  • getGrantOption
  • getURI
  • <init>
    Performs a deep copy on other.
  • 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
  • isSetDbName
    Returns true if field dbName is set (has been assigned a value) and false otherwise
  • isSetColumnName,
  • isSetDbName,
  • isSetGrantOption,
  • isSetPrivilegeScope,
  • isSetServerName,
  • isSetTableName,
  • isSetURI,
  • setAction,
  • setColumnName

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • requestLocationUpdates (LocationManager)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • 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