Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
None
-
None
-
None
Description
closedFiles is a set of Path, therefor closedFiles.contains(String) doesn't make sense.
lines 252-261:
private void verifyOpenFiles(HashSet<Path> closedFiles, HashMap<Path, FSDataOutputStream> openFileMap) throws IOException { HdfsAdmin hdfsAdmin = new HdfsAdmin(FileSystem.getDefaultUri(conf), conf); HashSet<Path> openFiles = new HashSet<>(openFileMap.keySet()); RemoteIterator<OpenFileEntry> openFilesRemoteItr = hdfsAdmin.listOpenFiles(); while (openFilesRemoteItr.hasNext()) { String filePath = openFilesRemoteItr.next().getFilePath(); assertFalse(filePath + " should not be listed under open files!", closedFiles.contains(filePath));