bigdata-examples icon indicating copy to clipboard operation
bigdata-examples copied to clipboard

flink的application模式下执行job

Open chenzhaoplus opened this issue 4 years ago • 14 comments

//存放flink集群相关的jar包目录 String flinkLibs = "hdfs://hadoopcluster/data/flink/libs"; //用户jar String userJarPath = "hdfs://hadoopcluster/data/flink/user-lib/TopSpeedWindowing.jar"; String flinkDistJar = "hdfs://hadoopcluster/data/flink/libs/flink-yarn_2.11-1.11.0.jar";

请问SubmitJobApplicationMode类里的这几个路径,flinkLibs里面放的jar包是有哪些?userJarPath 是执行job的上传jar包吗?

chenzhaoplus avatar Jan 08 '21 06:01 chenzhaoplus

flinkLibs就是flink 的lib目录下的那些jar ,用于构建flink集群的

zhangjun0x01 avatar Jan 08 '21 06:01 zhangjun0x01

String configurationDirectory = "/ops/app/flink-1.11.1/conf/"; String flinkLibs = "hdfs://master:8020/flink/libs/libs"; String userJarPath = "hdfs://master:8020/flink/jars/WordCount.jar"; String flinkDistJar = "hdfs://master:8020/flink/libs/flink-yarn_2.11-1.11.0.jar"; 这是我配置的路径代码,程序运行到 yarnClusterDescriptor.deployApplicationCluster 的时候就不动了,flink的running job看不到我的WordCount.jar任务。

chenzhaoplus avatar Jan 08 '21 07:01 chenzhaoplus

有什么报错信息吗?

zhangjun0x01 avatar Jan 08 '21 08:01 zhangjun0x01

有什么报错信息吗?

没有报错,这是我用控制台打印的日志,执行到yarnClusterDescriptor.deployApplicationCluster begin 就不走了,但是jps里面还是可以看到我这个jar在跑。

`try { System.out.println("--------------------------yarnClusterDescriptor.deployApplicationCluster begin--------------------------"); clusterClientProvider = yarnClusterDescriptor.deployApplicationCluster( clusterSpecification, appConfig); System.out.println("--------------------------yarnClusterDescriptor.deployApplicationCluster end--------------------------"); } catch (ClusterDeploymentException e){ e.printStackTrace(); System.out.println("error = "+e.getMessage()); }

	System.out.println("--------------------------getClusterClient begin--------------------------");
	ClusterClient<ApplicationId> clusterClient = clusterClientProvider.getClusterClient();
	ApplicationId applicationId = clusterClient.getClusterId();
	System.out.println("--------------------------applicationId = "+applicationId+"--------------------------");
	System.out.println("--------------------------getClusterClient end--------------------------");

	System.out.println("--------------------------begin--------------------------");`

chenzhaoplus avatar Jan 08 '21 08:01 chenzhaoplus

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

mispower avatar Aug 04 '21 02:08 mispower

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

你是windows系统提交的吧

zhangjun0x01 avatar Aug 17 '21 11:08 zhangjun0x01

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

你是windows系统提交的吧

是的,在windows系统中提交的

mispower avatar Sep 02 '21 07:09 mispower

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

你是windows系统提交的吧

是的,在windows系统中提交的

是系统分隔符的处理问题出现的bug,应该是加载classpath的地方,你debug调试一下,具体在哪里,我这不是windows系统,不知道是哪里的问题。

zhangjun0x01 avatar Sep 02 '21 10:09 zhangjun0x01

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

你是windows系统提交的吧

是的,在windows系统中提交的

请问window环境下,此问题解决了吗????

londing avatar Sep 05 '21 12:09 londing

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

你是windows系统提交的吧

是的,在windows系统中提交的

请问window环境下,此问题解决了吗????

这块我没有做处理,我这里电脑是非windows,而且咱们程序最终是部署在linux上的,所以我这块也没深度调研

zhangjun0x01 avatar Sep 06 '21 07:09 zhangjun0x01

求大佬给一波Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint的解决方案。

misi1987107 avatar Sep 15 '21 08:09 misi1987107

求大佬给一波Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint的解决方案。

请问大佬解决这个问题了吗?

Joy-ful avatar Nov 16 '21 07:11 Joy-ful

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

你是windows系统提交的吧

是的,在windows系统中提交的

请问window环境下,此问题解决了吗????

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

你是windows系统提交的吧

是的,在windows系统中提交的

请问大佬解决了吗,最近我也遇到这个问题

Joy-ful avatar Nov 16 '21 07:11 Joy-ful

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

你是windows系统提交的吧

是的,在windows系统中提交的

请问window环境下,此问题解决了吗????

你好,我这边也有这个需求,我这边提交任务的时候,在yarn container里面总是报错Error: Could not find or load main class org.apache.flink.yarn.entrypoint.YarnApplicationClusterEntryPoint

你是windows系统提交的吧

是的,在windows系统中提交的

请问大佬解决了吗,最近我也遇到这个问题

路径分隔符问题,window下是分号,linux下是冒号,组装classpath的逻辑里改一下。

xiaoHz avatar Apr 13 '23 08:04 xiaoHz