Charles Xu created FLINK-13130: ---------------------------------- Summary: Refactor AbstractYarnClusterDescriptor to avoid code duplication Key: FLINK-13130 URL: https://issues.apache.org/jira/browse/FLINK-13130 Project: Flink Issue Type: Improvement Components: Deployment / YARN Affects Versions: 1.8.1, 1.8.0 Reporter: Charles Xu
There are two places that checks environment variable (HADOO_CONF_DIR or YARN_CONF_DIR). It's better to extract one method to avoid code duplication. {code:java} // check if required Hadoop environment variables are set. If not, warn user private void checkEnvironmentVariable() { if (System.getenv("HADOOP_CONF_DIR") == null && System.getenv("YARN_CONF_DIR") == null) { LOG.warn("Neither the HADOOP_CONF_DIR nor the YARN_CONF_DIR environment variable is set. " + "The Flink YARN Client needs one of these to be set to properly load the Hadoop " + "configuration for accessing YARN."); } } {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)