public abstract class YarnClientUtils extends Object
| Constructor and Description |
|---|
YarnClientUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getRmPrincipal(org.apache.hadoop.conf.Configuration conf)
Look up and return the resource manager's principal.
|
static String |
getRmPrincipal(String rmPrincipal,
org.apache.hadoop.conf.Configuration conf)
Perform the
_HOST replacement in the principal,
Returning the result. |
public static String getRmPrincipal(org.apache.hadoop.conf.Configuration conf) throws IOException
_HOST replacement in the principal and
correctly handles HA resource manager configurations.conf - the Configuration file from which to read the
principalYarnConfiguration.RM_PRINCIPAL property is not set in the
conf parameterIOException - thrown if there's an error replacing the host namepublic static String getRmPrincipal(String rmPrincipal, org.apache.hadoop.conf.Configuration conf) throws IOException
_HOST replacement in the principal,
Returning the result. Correctly handles HA resource manager configurations.rmPrincipal - the principal string to prepareconf - the configurationIOException - thrown if there's an error replacing the host nameCopyright © 2022 Apache Software Foundation. All rights reserved.