public class YarnUtils
extends java.lang.Object
| Constructor and Description |
|---|
YarnUtils() |
| Modifier and Type | Method and Description |
|---|---|
static DataAccessException |
convertYarnAccessException(java.io.IOException e)
Converts
IOException to a Spring dao exception. |
static DataAccessException |
convertYarnAccessException(org.apache.hadoop.ipc.RemoteException e)
Converts
RemoteException to a Spring dao exception. |
static DataAccessException |
convertYarnAccessException(YarnException e)
Converts
YarnException to a Spring dao exception. |
static DataAccessException |
convertYarnAccessException(YarnRuntimeException e)
Converts
YarnRuntimeException to a Spring dao exception. |
static java.net.InetSocketAddress |
getAddress(Configuration conf)
Gets the address.
|
static ApplicationAttemptId |
getApplicationAttemptId(java.util.Map<java.lang.String,java.lang.String> environment)
Gets
ApplicationAttemptId from environment variables. |
static java.lang.String |
getPrincipal(Configuration conf)
Gets the principal.
|
static java.lang.String |
getUserName(Configuration conf)
Gets the user name.
|
static Configuration |
merge(Configuration base,
Configuration merge)
Merge configurations together.
|
static java.lang.String |
toString(Configuration conf)
Better toString() for hadoop
Configuration. |
public static DataAccessException convertYarnAccessException(YarnRuntimeException e)
YarnRuntimeException to a Spring dao exception.e - the YarnRuntimeExceptionDataAccessExceptionpublic static DataAccessException convertYarnAccessException(java.io.IOException e)
IOException to a Spring dao exception.e - the IOExceptionDataAccessExceptionpublic static DataAccessException convertYarnAccessException(org.apache.hadoop.ipc.RemoteException e)
RemoteException to a Spring dao exception.e - the RemoteExceptionDataAccessExceptionpublic static DataAccessException convertYarnAccessException(YarnException e)
YarnException to a Spring dao exception.e - the YarnExceptionDataAccessExceptionpublic static ApplicationAttemptId getApplicationAttemptId(java.util.Map<java.lang.String,java.lang.String> environment)
ApplicationAttemptId from environment variables.environment - Map of environment variablesApplicationAttemptIdpublic static java.lang.String getPrincipal(Configuration conf) throws java.io.IOException
conf - the confjava.io.IOException - Signals that an I/O exception has occurred.public static java.lang.String getUserName(Configuration conf)
conf - the Yarn configurationpublic static java.net.InetSocketAddress getAddress(Configuration conf)
conf - the Yarn configurationpublic static Configuration merge(Configuration base, Configuration merge)
base - the configuration to merge tomerge - the configuration to mergepublic static java.lang.String toString(Configuration conf)
Configuration.conf - the configuration