[
https://issues.apache.org/jira/browse/MAPREDUCE-5530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13777050#comment-13777050
]
Zhijie Shen commented on MAPREDUCE-5530:
----------------------------------------
The problem is valid, and the patch can ensure binary/source compatibility.
However, I've still some other concern. The incompatibility only happens when
the subclasses refer to protected boolean isSplitable(FileSystem fs, Path file)
or override it:
1. If the subclasses refer to isSplitable(FileSystem fs, Path file), the patch
provides the hook the subclasses.
2. If the subclasses override isSplitable(FileSystem fs, Path file),
NoSuchMethodError will not be thrown as well. However, since the method is
never called by getSplits() (assume that getSplits() is not overrode to call
this method instead), the override actually doesn't work, which may logically
break the user application.
In the second case, no immediate idea about how to deal with it.
> Binary and source incompatibility in mapred.lib.CombineFileInputFormat
> between branch-1 and branch-2
> ----------------------------------------------------------------------------------------------------
>
> Key: MAPREDUCE-5530
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-5530
> Project: Hadoop Map/Reduce
> Issue Type: Sub-task
> Components: mrv1, mrv2
> Affects Versions: 2.1.1-beta
> Reporter: Robert Kanter
> Assignee: Robert Kanter
> Priority: Blocker
> Attachments: MAPREDUCE-5530.patch
>
>
> {{mapred.lib.CombineFileInputFormat}} in branch-1 has this method:
> {code:java}
> protected boolean isSplitable(FileSystem fs, Path file)
> {code}
> In branch-2, {{mapred.lib.CombineFileInputFormat}} is now a subclass of
> {{mapreduce.lib.input.CombineFileInputFormat}}, from which it inherits the
> similar method:
> {code:java}
> protected boolean isSplitable(JobContext context, Path file)
> {code}
> This means that any code that subclasses
> {{mapred.lib.CombineFileInputFormat}} and does not provide its own
> implementation of {{protected boolean isSplitable(FileSystem fs, Path file)}}
> will not be binary or source compatible if it tries to call {{isSplitable}}
> with a {{FileSystem}} argument anywhere (that is, if compiled against
> branch-1, it will throw a {{NoSuchMethodError}} if run against branch-2;
> also, it won't even compile against branch-2).
--
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