Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
1.10.1, 1.11.3
-
None
-
None
Description
description: When I submitted flink-on-yarn job on Windows (Operating system of yarn cluster is Linux), I got error message:
Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnJobClusterEntrypoint
cause: Windows has different classPath delimiter with Linux as in Windows is " ; ", but in Linux is " : ". the main cause is that classPath was built on Windows, but was splitted on Linux.
solution : replace value of File.pathSeparator with ApplicationConstants.CLASS_PATH_SEPARATOR in class of org.apache.flink.yarn.YarnClusterDescriptor and org.apache.flink.yarn.Utils.
sourceCode is displayed below:
private ApplicationReport startAppMaster(......) throws Exception { ...... // classpath assembler StringBuilder classPathBuilder = new StringBuilder(); if (userJarInclusion == YarnConfigOptions.UserJarInclusion.FIRST) { for (String userClassPath : userClassPaths) { classPathBuilder.append(userClassPath).append(File.pathSeparator); } } for (String classPath : systemClassPaths) { classPathBuilder.append(classPath).append(File.pathSeparator); } ...... // Setup CLASSPATH and environment variables for ApplicationMaster final Map<String, String> appMasterEnv = new HashMap<>(); // set user specified app master environment variables appMasterEnv.putAll( BootstrapTools.getEnvironmentVariables(ResourceManagerOptions.CONTAINERIZED_MASTER_ENV_PREFIX, configuration)); // set Flink app class path appMasterEnv.put(YarnConfigKeys.ENV_FLINK_CLASSPATH, classPathBuilder.toString()); ...... }
Attachments
Attachments
Issue Links
- is related to
-
FLINK-16683 Remove scripts for starting Flink on Windows
- Closed
-
FLINK-17858 Yarn mode, windows and linux environment should be interlinked
- Closed