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

Yi Liu commented on MAPREDUCE-6227:
-----------------------------------

Thanks [~shv] for the patch.
Overall looks very good, just few comments, +1 after addressing.
# . 
{code}
isClosed = (status.getLen() == newLength);
{code}
If {{isClosed}} is true, we should break the loop and no need for an additional 
sleep, right?
# .
{code}
reporter.setStatus("truncate recover for " + name + " to newLength " + 
            newLength + " attempt " + (i++) + " ::host = " + hostName);
{code}
{{i++}} is duplicated with the one in {{for}}, we should only keep one.
# .
{code}
try { Thread.sleep(DELAY); } catch (InterruptedException ignored) {}
{code}
I would like to use apache code style, but if you want to keep this, it's OK 
for me.
# This comment is unrelated to your patch, but if you can fix it, it would be 
great. in {{createControlFile}}, could you format the {{finally}} closure.

> DFSIO for truncate
> ------------------
>
>                 Key: MAPREDUCE-6227
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6227
>             Project: Hadoop Map/Reduce
>          Issue Type: New Feature
>          Components: benchmarks, test
>    Affects Versions: 2.7.0
>            Reporter: Konstantin Shvachko
>            Assignee: Konstantin Shvachko
>         Attachments: DFSIO-truncate-00.patch, DFSIO-truncate-01.patch
>
>
> Create a benchmark and a test for truncate within the framework of TestDFSIO.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to