[ https://issues.apache.org/jira/browse/HDFS-12315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16866280#comment-16866280 ]
Hudson commented on HDFS-12315: ------------------------------- SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #16772 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/16772/]) HDFS-12315. Use Path instead of String to check closedFiles set. (weichiu: rev d41310a15dfd2b6c9b5b1102327335e550917e0a) * (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHdfsAdmin.java > Use Path instead of String in the TestHdfsAdmin.verifyOpenFiles() > ----------------------------------------------------------------- > > Key: HDFS-12315 > URL: https://issues.apache.org/jira/browse/HDFS-12315 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Oleg Danilov > Assignee: Oleg Danilov > Priority: Trivial > Fix For: 3.3.0 > > Attachments: HDFS-12315.patch > > > closedFiles is a set of Path, therefor closedFiles.contains(String) doesn't > make sense. > lines 252-261: > {code:java} > 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)); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org