[ 
https://issues.apache.org/jira/browse/HDFS-4572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13596641#comment-13596641
 ] 

Chris Nauroth commented on HDFS-4572:
-------------------------------------

Great catches!

Is it possible/worthwhile to use one of the file sharing APIs on the lock file 
instead of saying that the lock owner is unknown?  (i.e. 
{{NativeIO#getShareDeleteFileInputStream}} or perhaps add a new 
{{NativeIO#getShareReadFileInputStream}} for additional safety.)

{code}
+          lockingJvmName = new String("'unknown'");
{code}

Since this is a string literal, we wouldn't need to call new, and instead could 
just say:

{code}
+          lockingJvmName = "'unknown'";
{code}

                
> Fix TestJournal failures on Windows
> -----------------------------------
>
>                 Key: HDFS-4572
>                 URL: https://issues.apache.org/jira/browse/HDFS-4572
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode, test
>    Affects Versions: 3.0.0
>            Reporter: Arpit Agarwal
>             Fix For: 3.0.0
>
>         Attachments: HDFS-4572.patch
>
>
> Multiple test failures in TestJournal. Windows is stricter about restricting 
> access to in-use files.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to