Gets the name of the user that is running the JVM.

@return The name of the user that is running the JVM.
512836
public static String getHadoopUser() {
		try {
			Class<?> ugiClass = Class.forName(
				"org.apache.hadoop.security.UserGroupInformation",
				false,
				EnvironmentInformation.class.getClassLoader());

			Method currentUserMethod = ugiClass.getMethod("getCurrentUser");
			Method shortUserNameMethod = ugiClass.getMethod("getShortUserName");
			Object ugi = currentUserMethod.invoke(null);
			return (String) shortUserNameMethod.invoke(ugi);
		}
		catch (ClassNotFoundException e) {
			return "<no hadoop dependency found>";
		}
		catch (LinkageError e) {
			// hadoop classes are not in the classpath
			LOG.debug("Cannot determine user/group information using Hadoop utils. " +
					"Hadoop classes not loaded or compatible", e);
		}
		catch (Throwable t) {
			// some other error occurred that we should log and make known
			LOG.warn("Error while accessing user/group information via Hadoop utils.", t);
		}
		
		return UNKNOWN;
	}
29316
public java.lang.String getVmName() {
    java.lang.Object ref = vmName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      vmName_ = s;
      return s;
    }
  }
699565
@Nullable
  public IUser getUserOfLoginName (@Nullable final String sLoginName)
  {
    if (StringHelper.hasNoText (sLoginName))
      return null;

    return findFirst (x -> x.getLoginName ().equals (sLoginName));
  }
1321298
public static Optional<String> getCurrentTenant() {
        final UserDetails userDetails = getCurrentUser();
        if (!(userDetails instanceof UserPrincipal)) {
            return Optional.empty();
        }

        final UserPrincipal userPrincipal = (UserPrincipal) userDetails;
        return Optional.of(userPrincipal.getTenant().trim());
    }
46130
@Override
    public String getName() {
        final Object attributeValue = this.getAttributeValue(this.userNameAttribute);
        if (attributeValue == null) {
            return null;
        }

        return attributeValue.toString();
    }
1071893
public String getName(boolean forcedUpdate) {
		if ((name == null || forcedUpdate) && getRiotApi() != null) {
			try {
				name = getRiotApi().getName(connection.getUser());
			} catch (final IOException e) {
				e.printStackTrace();
			}
		}
		return name;
	}
1332523
public String getName()
    {
        if ( name == null )
        {
            name = MessageFormat.format( "{0}-{1}{2}.{3}", new Object[]{ artifactId, getTimestampVersion(),
                ( classifier == null ? "" : "-" + classifier ), type } );
        }
        return name;
    }
784799
public String getServerName()
    {
        String host=_listener.getHost();
        if (InetAddrPort.__0_0_0_0.equals(host) &&
            _connection instanceof Socket)
            host = ((Socket)_connection).getLocalAddress().getHostName();
        
        return host;
    }
858104
public String getMEName()
   {
     if (tc.isEntryEnabled())
       SibTr.entry(tc, "getMEName");
     
     String meName = _messageProcessor.getMessagingEngineName();
     
     if (tc.isEntryEnabled())
       SibTr.exit(tc, "getMEName", meName);
     return meName;
   }
479742
public com.google.protobuf.ByteString
      getVmNameBytes() {
    java.lang.Object ref = vmName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      vmName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
881826
def getUserName(self):
        """"""
        if not self._server_side:
            return
        mech = self._authenticator.current_mech
        return mech.getUserName() if mech else None
1357878
public String getLockedByName() {

        String lockedBy = "";
        if (!getLock().isNullLock()) {
            // user
            lockedBy = getLock().getUserId().toString();
            try {
                lockedBy = getCurrentOuRelativeName(
                    CmsPrincipal.readPrincipalIncludingHistory(getCms(), getLock().getUserId()).getName());
            } catch (Throwable e) {
                lockedBy = e.getMessage();
            }
        }
        return lockedBy;
    }
142128
private String getHostName() {
        String hostName = AccessController.doPrivileged(new PrivilegedAction<String>() {
            @Override
            public String run() {
                try {
                    return java.net.InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
                } catch (java.net.UnknownHostException e) {
                    return "localhost";
                }
            }
        });
        return hostName;
    }
1372943
public String getKey() {
        String dbkey = ThreadContext.getContext(dbName);
        if (dbkey == null) {
            Integer userid = ThreadContext.getShardKey();
            if (userid == null) {
                userid = 0;
                // throw new
                // RuntimeException("No userid contexted,so you can't know how to routing!!");
            }
            dbkey = router.getTargetDataSourceKey(userid, true);

            StackTraceElement[] elements = Thread.currentThread().getStackTrace();

            logTrace(dbkey, elements);

        }
        return dbkey;
    }
901632
public String getName() {
        if (name == null && securityIdentity != null) {
            name = securityIdentity.getPrincipal().getName();
        }

        return name;
    }
493802
public static String getCurrentUser() {
        ServiceContext ctx = ServiceContextStore.get();
        String currentUser;
        if (ctx == null) {
            currentUser = ServiceContextFactory.SYSTEM_USER;
        } else {
            currentUser = ctx.getUserId();
        }

        if (currentUser == null) {
            currentUser = ServiceContextFactory.UNKNOWN_USER;
        }
        return currentUser;
    }
1013181
public static String getCurrentId()
  {
    SystemManager system = getCurrent();

    if (system == null) {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();

      throw new IllegalStateException(L.l("{0} is not available in this context.\n  {1}",
                                          SystemManager.class.getSimpleName(),
                                          loader));
    }

    return system.getId();
  }