Hi Kirti Dhar, What is your java version? I guess this problem may be related to FLINK-33309[1]. Maybe you can try adding "-Djava.security.manager" to the java options.
[1] https://issues.apache.org/jira/browse/FLINK-33309 Kirti Dhar Upadhyay K via user <user@flink.apache.org> 于2024年3月6日周三 18:10写道: > > Hi Team, > > > > I am using Flink File Source with Local File System. > > I am facing an issue, if source directory does not has read permission, it is > returning the list of files as null instead of throwing permission exception > (refer the highlighted line below), resulting in NPE. > > > > final FileStatus[] containedFiles = fs.listStatus(fileStatus.getPath()); > for (FileStatus containedStatus : containedFiles) { > addSplitsForPath(containedStatus, fs, target); > } > > Debugging the issue found that, SecurityManager is coming as null while > listing the files, hence skipping the permissions on directory. > > What is the way to set SecurityManager in Flink? > > > > Regards, > > Kirti Dhar > > -- Best, Yanfei