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

Colin Patrick McCabe commented on HDFS-7807:
--------------------------------------------

Thanks for the review, Chris.

bq. round_up_to_power_of_2 does not return a power of 2 for i == 0. However, we 
don't need it to, because we separately enforce HTABLE_MIN_SIZE of 4. Maybe 
just drop a quick comment here to prevent confusion?

Hmm, good call.  Let me just add a special case for i == 0 so that the function 
does what it says.  Always good to keep things simple, and this doesn't need to 
be super-optimized since it only runs once. :)

bq. On Windows, the compiler spews a bunch of type cast and loss of precision 
warnings on the test code. This is really just a side effect of manually 
setting void pointer values to stub the keys and values for the tests. I think 
it's acceptable to stifle the warnings by adding the following right before 
main:

thanks, added

> libhdfs htable.c: fix htable resizing, add unit test
> ----------------------------------------------------
>
>                 Key: HDFS-7807
>                 URL: https://issues.apache.org/jira/browse/HDFS-7807
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: native
>    Affects Versions: 2.7.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-7807.001.patch
>
>
> libhdfs htable.c: fix htable resizing, add unit test



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

Reply via email to