[ 
https://issues.apache.org/jira/browse/FLINK-18982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flink Jira Bot updated FLINK-18982:
-----------------------------------
    Labels: auto-deprioritized-major pull-request-available stale-minor  (was: 
auto-deprioritized-major pull-request-available)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help 
the community manage its development. I see this issues has been marked as 
Minor but is unassigned and neither itself nor its Sub-Tasks have been updated 
for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is 
still Minor, please either assign yourself or give an update. Afterwards, 
please remove the label or in 7 days the issue will be deprioritized.


> InputFormat should remove unnecessary override methods
> ------------------------------------------------------
>
>                 Key: FLINK-18982
>                 URL: https://issues.apache.org/jira/browse/FLINK-18982
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / Core
>    Affects Versions: 1.11.1
>            Reporter: Ryan Tao
>            Priority: Minor
>              Labels: auto-deprioritized-major, pull-request-available, 
> stale-minor
>
> _InputFormat_ has inherited from _InputSplitSource_. Based on basic Java 
> knowledge, these two methods do not need to be written here, which may easily 
> lead to ambiguity and duplicated. 
> And the behavior of these two methods should belong to _InputSplitSource_ 
> instead of _InputFormat. (about split)_
> InputFormat:
> {code:java}
> public interface InputFormat<OT, T extends InputSplit> extends 
> InputSplitSource<T>, Serializable {
>     ...
>     @Override
>     T[] createInputSplits(int minNumSplits) throws IOException;
>     @Override
>     InputSplitAssigner getInputSplitAssigner(T[] inputSplits);
>     ...
> }
> {code}
>  InputSplitSource:
> {code:java}
> public interface InputSplitSource<T extends InputSplit> extends Serializable {
>    T[] createInputSplits(int minNumSplits) throws Exception; 
>    InputSplitAssigner getInputSplitAssigner(T[] inputSplits);
> }{code}
> As for the reason, watching the commit history, we can find that these two 
> methods appeared in _InputFormat_ before _InputSplitSource_. Later, they were 
> taken to InputSplitSource separately, but they were not removed in 
> _InputFormat_.
> Another point is that the _InputSplitSource throws an Exception_, as it 
> should be. (Subclasses of InputFormat throw specific exception.)
> And the duplicated _InputFormat extends Serializable_.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to