Re: Flink 1.10 classpath

2020-09-26 Thread Yang Wang
It is an interesting requirement. Usually, we suggest our users to add these dependencies in lib directory or ship via --yarnship cli option. If you really do not want to do this, I think you could ship an updated yarn-site.xml, set "yarn.application.classpath" including the mapreduce jars. Then a

Re: [Flink 1.10] Classpath doesn't include custom files in lib/

2020-02-17 Thread Yang Wang
Hi Maxim, Both Yarn per-job and session cluster should work. Since before the JobManager and TaskManager launcher, Yarn NodeManager could guarantee that all the local resources have been localized and accessible. If do not want to use the getResource to read the file and use File interface instead

Re: [Flink 1.10] Classpath doesn't include custom files in lib/

2020-02-17 Thread Maxim Parkachov
Hi Yang, I've just tried your suggestions, but, unfortunately, in yarn per job mode it doesn't work, both commands return null. I double checked that file is shipped to yarn container, but I feel that it happens later in process. At the moment I'm reading file with File interface, instead of getti

Re: [Flink 1.10] Classpath doesn't include custom files in lib/

2020-02-17 Thread Yang Wang
Hi Maxim, I have verified that the following two ways could both work. getClass().getClassLoader().getResource("lib/job.properties") getClass().getClassLoader().getResource("job.properties") Best, Yang Maxim Parkachov 于2020年2月17日周一 下午6:47写道: > Hi Yang, > > thanks, this explains why classpath

Re: [Flink 1.10] Classpath doesn't include custom files in lib/

2020-02-17 Thread Maxim Parkachov
Hi Yang, thanks, this explains why classpath behavior changed, but now I struggle to understand how I could overwrite resource, which is already shipped in job jar. Before I had job.properties files in JAR in under resources/lib/job.properties for local development and deploying on cluster it was

Re: [Flink 1.10] Classpath doesn't include custom files in lib/

2020-02-16 Thread Yang Wang
Hi Maxim Parkachov, The users files also have been shipped to JobManager and TaskManager. However, it is not directly added to the classpath. Instead, the parent directory is added to the classpath. This changes are to make resource classloading work. You could check more information here[1]. [1