[
https://issues.apache.org/jira/browse/HADOOP-5604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694761#action_12694761
]
Klaas Bosteels commented on HADOOP-5604:
----------------------------------------
Konstantin:
* The deprecated class is there because we want to support both the new and the
old mapreduce API. This does make sense, in my opinion, since the old API is
still used heavily (personally I'm using the {{BinaryPartitioner}} from
Streaming, for instance, which still uses the old API and might continue doing
so for while). The deprecated version just extends the one using the new API
though, so there's not code duplication.
* The {{null}} parameter is just because the value parameter is irrelevant for
this particular partitioner, but obviously we do want it to take this parameter
because it has to implement the partitioner interface.
* The tests are indeed replicated, but they are not identical, since one of
them uses the deprecated class while the other uses the class from the new API.
In theory it would be sufficient to test only the non-deprecated class (because
the deprecated one extends the non-deprecated one), but it felt safer to have a
unit test for both.
I was aware that the unit tests added by the patch generate javac warnings, but
I thought javac warnings for unit tests were not considered harmful. We could
suppress the warnings like Chris did in his patch, but apart from that I don't
think anything should change.
> TestBinaryPartitioner javac warnings.
> -------------------------------------
>
> Key: HADOOP-5604
> URL: https://issues.apache.org/jira/browse/HADOOP-5604
> Project: Hadoop Core
> Issue Type: Bug
> Components: mapred, test
> Affects Versions: 0.21.0
> Reporter: Konstantin Shvachko
> Fix For: 0.21.0
>
> Attachments: 5604-0.patch
>
>
> This is introduced by HADOOP-5528.
> All of them about using unparametrized types.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.