Tabnine Logo
UserBitShared$UserCredentials.getUserName
Code IndexAdd Tabnine to your IDE (free)

How to use
getUserName
method
in
org.apache.drill.exec.proto.UserBitShared$UserCredentials

Best Java code snippets using org.apache.drill.exec.proto.UserBitShared$UserCredentials.getUserName (Showing top 14 results out of 315)

origin: org.apache.drill.exec/drill-java-exec

private void logQuerySummary() {
 try {
  LoggedQuery q = new LoggedQuery(
    queryIdString,
    queryContext.getQueryContextInfo().getDefaultSchemaName(),
    queryText,
    new Date(queryContext.getQueryContextInfo().getQueryStartTime()),
    new Date(System.currentTimeMillis()),
    queryStateProcessor.getState(),
    queryContext.getSession().getCredentials().getUserName(),
    initiatingClient.getRemoteAddress());
  queryLogger.info(MAPPER.writeValueAsString(q));
 } catch (Exception e) {
  logger.error("Failure while recording query information to query log.", e);
 }
}
origin: org.apache.drill.exec/drill-java-exec

public ConnectionInfo(Entry<BitToUserConnection, BitToUserConnectionConfig> connectionConfigPair, String hostname) {
 BitToUserConnection connection = connectionConfigPair.getKey();
 BitToUserConnectionConfig config = connectionConfigPair.getValue();
 UserSession userSession = connection.getSession();
 this.user = userSession.getCredentials().getUserName();
 DateTime dateTime = config.getEstablished();
 this.established = new Timestamp(
   dateTime
   .plusMillis(TimeZone.getDefault().getOffset(dateTime.getMillis())) //Adjusting for -Duser.timezone
   .getMillis());
 this.duration = (new SimpleDurationFormat(dateTime.getMillis(), System.currentTimeMillis()))
   .verbose();
 this.client = extractIpAddr(connection.getRemoteAddress().toString());
 this.drillbit = hostname;
 this.session = userSession.getSessionId();
 this.queries = userSession.getQueryCount();
 this.isAuthenticated = config.isAuthEnabled();
 this.isEncrypted = config.isEncryptionEnabled();
 this.usingSSL = config.isSSLEnabled();
}
origin: org.apache.drill.exec/drill-java-exec

final String proxyName = session.getCredentials().getUserName();
if (!hasImpersonationPrivileges(proxyName, targetName, impersonationPolicies)) {
 throw UserException.permissionError()
origin: org.apache.drill.exec/drill-java-exec

connection.finalizeSession(inbound.getCredentials().getUserName());
respBuilder.setStatus(HandshakeStatus.SUCCESS);
return respBuilder.build();
final String userName = inbound.getCredentials().getUserName();
if (logger.isTraceEnabled()) {
 logger.trace("User {} on connection {} is likely using an older client.",
origin: org.apache.drill.exec/drill-java-exec

@Override
public PhysicalOperator visitScan(final Scan scan, final Object obj) throws OptimizerException {
 final StoragePluginConfig config = logicalPlan.getStorageEngineConfig(scan.getStorageEngine());
 if(config == null) {
  throw new OptimizerException(
    String.format("Logical plan referenced the storage engine config %s but the logical plan didn't have that available as a config.",
      scan.getStorageEngine()));
 }
 try {
  final StoragePlugin storagePlugin = queryContext.getStorage().getPlugin(config);
  final String user = userSession.getSession().getCredentials().getUserName();
  return storagePlugin.getPhysicalScan(user, scan.getSelection(), userSession.getSession().getOptions());
 } catch (IOException | ExecutionSetupException e) {
  throw new OptimizerException("Failure while attempting to retrieve storage engine.", e);
 }
}
origin: org.apache.drill.exec/drill-java-exec

/**
 * Helper method to create a {@link PojoRecordReader} for given arguments.
 * @param tableType
 * @param filter
 * @param provider
 * @param userSession
 * @return
 */
private static <S> PojoRecordReader<S> getPojoRecordReader(final InfoSchemaTableType tableType, final InfoSchemaFilter filter, final DrillConfig config,
  final SchemaTreeProvider provider, final UserSession userSession) {
 final SchemaPlus rootSchema =
   provider.createFullRootSchema(userSession.getCredentials().getUserName(), newSchemaConfigInfoProvider(config, userSession, provider));
 return tableType.getRecordReader(rootSchema, filter, userSession.getOptions());
}
origin: org.apache.drill/drill-protocol

public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.UserCredentials message) throws java.io.IOException
{
  if(message.hasUserName())
    output.writeString(1, message.getUserName(), false);
}
public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.UserCredentials message)
origin: org.apache.drill.exec/drill-java-exec

/**
 * Get the user name of the user who issued the query that is managed by this QueryContext.
 * @return The user name of the user who issued the query that is managed by this QueryContext.
 */
@Override
public String getQueryUserName() {
 return session.getCredentials().getUserName();
}
origin: org.apache.drill.exec/drill-java-exec

public ContextInformation(final UserCredentials userCredentials, final QueryContextInformation queryContextInfo) {
 this.queryUser = userCredentials.getUserName();
 this.currentDefaultSchema = queryContextInfo.getDefaultSchemaName();
 this.queryStartTime = queryContextInfo.getQueryStartTime();
 this.rootFragmentTimeZone = queryContextInfo.getTimeZone();
 this.sessionId = queryContextInfo.getSessionId();
}
origin: org.apache.drill.exec/drill-java-exec

@Override
public String getQueryUserName() {
 return fragment.getCredentials().getUserName();
}
origin: org.apache.drill.exec/drill-java-exec

 @Override
 public String getQueryUserName() {
  return session.getCredentials().getUserName();
 }
};
origin: org.apache.drill/drill-protocol

/**
 * <code>optional string user_name = 1;</code>
 */
public Builder clearUserName() {
 bitField0_ = (bitField0_ & ~0x00000001);
 userName_ = getDefaultInstance().getUserName();
 onChanged();
 return this;
}
/**
origin: apache/drill

public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.UserCredentials message) throws java.io.IOException
{
  if(message.hasUserName())
    output.writeString(1, message.getUserName(), false);
}
public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.UserCredentials message)
origin: apache/drill

/**
 * <code>optional string user_name = 1;</code>
 */
public Builder clearUserName() {
 bitField0_ = (bitField0_ & ~0x00000001);
 userName_ = getDefaultInstance().getUserName();
 onChanged();
 return this;
}
/**
org.apache.drill.exec.protoUserBitShared$UserCredentialsgetUserName

Javadoc

optional string user_name = 1;

Popular methods of UserBitShared$UserCredentials

  • newBuilder
  • <init>
  • getDefaultInstance
  • getSerializedSize
  • getUnknownFields
  • getUserNameBytes
    optional string user_name = 1;
  • hasUserName
    optional string user_name = 1;
  • initFields
  • isInitialized
  • makeExtensionsImmutable
  • parseUnknownField
  • toBuilder
  • parseUnknownField,
  • toBuilder

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Runner (org.openjdk.jmh.runner)
  • 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