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

Reply via email to