public abstract class YarnClientUtils
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
NO_LABEL_ERR_MSG |
| Constructor | Description |
|---|---|
YarnClientUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.List<org.apache.hadoop.yarn.api.records.NodeLabel> |
buildNodeLabelsFromStr(java.lang.String args) |
Creates node labels from string
|
static java.lang.String |
generateToken(java.lang.String server) |
Generate SPNEGO challenge request token.
|
static java.lang.String |
getRmPrincipal(java.lang.String rmPrincipal,
org.apache.hadoop.conf.Configuration conf) |
Perform the
_HOST replacement in the principal,
Returning the result. |
static java.lang.String |
getRmPrincipal(org.apache.hadoop.conf.Configuration conf) |
Look up and return the resource manager's principal.
|
static boolean |
isYarnFederationEnabled(org.apache.hadoop.conf.Configuration conf) |
public static final java.lang.String NO_LABEL_ERR_MSG
public static java.lang.String getRmPrincipal(org.apache.hadoop.conf.Configuration conf)
throws java.io.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 parameterjava.io.IOException - thrown if there's an error replacing the host namepublic static java.lang.String getRmPrincipal(java.lang.String rmPrincipal,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
_HOST replacement in the principal,
Returning the result. Correctly handles HA resource manager configurations.rmPrincipal - the principal string to prepareconf - the configurationjava.io.IOException - thrown if there's an error replacing the host namepublic static java.util.List<org.apache.hadoop.yarn.api.records.NodeLabel> buildNodeLabelsFromStr(java.lang.String args)
args - nodelabels string to be parsedpublic static java.lang.String generateToken(java.lang.String server)
throws java.io.IOException,
java.lang.InterruptedException
server - - hostname to contactjava.io.IOException - thrown if doAs failedjava.lang.InterruptedException - thrown if doAs is interruptedpublic static boolean isYarnFederationEnabled(org.apache.hadoop.conf.Configuration conf)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.