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

Xiaoyu Yao commented on HDDS-130:
---------------------------------

Thanks [~Sandeep Nemuri] for the update. Patch v2 looks good to me. Just two 
minor issues:

 

NIT: Line 70-71: Can we consolidate the tempDir prep in a single helper 
function for reuse?

{code}

private File ensureRandomTempDir(String baseDir) {

  File tempDir = new File(baseDir, getRandomDir());
  FileUtils.forceMkdir(tempDir);

}

{code}

 

Line 96: the PrintStream need to be closed or preferably using the Java7 ARM, 
a.k.a., try-with-resources like below to avoid leaking.

{code}

try (PrintStream ps = new PrintStream(outContent)) {

System.setOut(ps);

...

System.setOut(System.out);

}

{code}  

> TestGenerateOzoneRequiredConfigurations should use 
> GenericTestUtils#getTempPath to set output directory
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-130
>                 URL: https://issues.apache.org/jira/browse/HDDS-130
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Nanda kumar
>            Assignee: Sandeep Nemuri
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.2.1
>
>         Attachments: HDDS-130.001.patch, HDDS-130.002.patch
>
>
> {{TestGenerateOzoneRequiredConfigurations}} uses current directory (.) as its 
> output location which generates {{ozone-site.xml}} file in the directory from 
> where the test-cases is executed. Insead we should use 
> {{GenericTestUtils#getTempPath}} to get the output directory for test-cases.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to