public final class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
KEYTAB_FILE_NAME
Keytab file name populated in YARN container.
|
static String |
KRB5_FILE_NAME
KRB5 file name populated in YARN container for secure IT run.
|
static int |
REMOTE_RESOURCES_FETCH_NUM_RETRY
Number of total retries to fetch the remote resources after uploaded in case of FileNotFoundException.
|
static int |
REMOTE_RESOURCES_FETCH_WAIT_IN_MILLI
Time to wait in milliseconds between each remote resources fetch in case of FileNotFoundException.
|
static String |
YARN_SITE_FILE_NAME
Yarn site xml file name populated in YARN container for secure IT run.
|
Modifier and Type | Method and Description |
---|---|
static void |
addToEnvironment(Map<String,String> environment,
String variable,
String value)
Copied method from org.apache.hadoop.yarn.util.Apps.
|
static int |
calculateHeapSize(int memory,
Configuration conf)
See documentation.
|
static void |
deleteApplicationFiles(Map<String,String> env)
Deletes the YARN application files, e.g., Flink binaries, libraries, etc., from the remote
filesystem.
|
static Map<String,String> |
getEnvironmentVariables(String envPrefix,
Configuration flinkConfiguration)
Method to extract environment variables from the flinkConfiguration based on the given prefix String.
|
static void |
setTokensFor(org.apache.hadoop.yarn.api.records.ContainerLaunchContext amContainer,
List<org.apache.hadoop.fs.Path> paths,
Configuration conf) |
static void |
setupYarnClassPath(Configuration conf,
Map<String,String> appMasterEnv) |
public static final String KEYTAB_FILE_NAME
public static final String KRB5_FILE_NAME
public static final String YARN_SITE_FILE_NAME
public static final int REMOTE_RESOURCES_FETCH_NUM_RETRY
public static final int REMOTE_RESOURCES_FETCH_WAIT_IN_MILLI
public static int calculateHeapSize(int memory, Configuration conf)
public static void setupYarnClassPath(Configuration conf, Map<String,String> appMasterEnv)
public static void deleteApplicationFiles(Map<String,String> env)
env
- The environment variables.public static void setTokensFor(org.apache.hadoop.yarn.api.records.ContainerLaunchContext amContainer, List<org.apache.hadoop.fs.Path> paths, Configuration conf) throws IOException
IOException
public static void addToEnvironment(Map<String,String> environment, String variable, String value)
public static Map<String,String> getEnvironmentVariables(String envPrefix, Configuration flinkConfiguration)
envPrefix
- Prefix for the environment variables keyflinkConfiguration
- The Flink config to get the environment variable definition fromCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.