You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/17 05:36:02 UTC
[jira] [Commented] (HDFS-12315) Use Path instead of String in the
TestHdfsAdmin.verifyOpenFiles()
[ https://issues.apache.org/jira/browse/HDFS-12315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16129957#comment-16129957 ]
ASF GitHub Bot commented on HDFS-12315:
---------------------------------------
GitHub user dosoft opened a pull request:
https://github.com/apache/hadoop/pull/266
HDFS-12315: Use Path instead of String to check closedFiles set
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dosoft/hadoop HDFS-12315
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/hadoop/pull/266.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #266
----
commit c6ed014ac0a0007f80611da928d345b240e8fc79
Author: Oleg Danilov <ol...@olegd.com>
Date: 2017-08-17T05:33:15Z
HDFS-12315: Use Path instead of String to check closedFiles set
----
> 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
> Priority: Trivial
> 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
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org