Tabnine Logo
ThriftUtil.setImpersonator
Code IndexAdd Tabnine to your IDE (free)

How to use
setImpersonator
method
in
org.apache.sentry.core.common.utils.ThriftUtil

Best Java code snippets using org.apache.sentry.core.common.utils.ThriftUtil.setImpersonator (Showing top 5 results out of 315)

origin: apache/sentry

 @Override
 public boolean process(TProtocol in, TProtocol out) throws TException {
  ThriftUtil.setIpAddress(in);
  ThriftUtil.setImpersonator(in);
  return super.process(in, out);
 }
}
origin: apache/sentry

 @Override
 public boolean process(TProtocol in, TProtocol out) throws TException {
  // set the ip and impersonator for audit log
  ThriftUtil.setIpAddress(in);
  ThriftUtil.setImpersonator(in);
  return super.process(in, out);
 }
}
origin: apache/sentry

public static void setImpersonator(final TProtocol in) {
 try {
  TTransport transport = in.getTransport();
  if (transport instanceof TSaslServerTransport) {
   String impersonator = ((TSaslServerTransport) transport).getSaslServer()
     .getAuthorizationID();
   setImpersonator(impersonator);
  }
 } catch (Exception e) {
  // If there has exception when get impersonator info, log the error information.
  LOGGER.warn("There is an error when get the impersonator:" + e.getMessage());
 }
}
origin: apache/sentry

@BeforeClass
public static void init() {
 conf = new Configuration();
 conf.set(ServerConfig.SENTRY_SERVICE_NAME, ServerConfig.SENTRY_SERVICE_NAME_DEFAULT);
 ThriftUtil.setIpAddress(TEST_IP);
 ThriftUtil.setImpersonator(TEST_IMPERSONATOR);
 TEST_PRIVILEGES_MAP.put("resourceType1", "resourceName1");
 TEST_PRIVILEGES_MAP.put("resourceType2", "resourceName2");
 TEST_PRIVILEGES_MAP.put("resourceType3", "resourceName3");
}
origin: apache/sentry

@BeforeClass
public static void init() {
 conf = new Configuration();
 conf.set(ServerConfig.SENTRY_SERVICE_NAME,
   ServerConfig.SENTRY_SERVICE_NAME_DEFAULT);
 ThriftUtil.setIpAddress(TEST_IP);
 ThriftUtil.setImpersonator(TEST_IMPERSONATOR);
}
org.apache.sentry.core.common.utilsThriftUtilsetImpersonator

Popular methods of ThriftUtil

  • setIpAddress
  • getImpersonator
  • getIpAddress
  • getUnderlyingSocketFromTransport
    Returns the underlying TSocket from the transport, or null of the transport type is unknown.
  • parseAddress
    Utility function for parsing host and port strings. Expected form should be (host:port). The hostnam

Popular in Java

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top plugins for WebStorm
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