[
https://issues.apache.org/jira/browse/FLINK-12008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16878422#comment-16878422
]
vinoyang commented on FLINK-12008:
----------------------------------
Hi [~fhueske] my plan is to add two methods e.g. {{xxxs}} for every method in
{{HadoopInputs}} currently.
For example:
{code:java}
public static <K, V> HadoopInputFormat<K, V>
readHadoopFile(org.apache.hadoop.mapred.FileInputFormat<K, V>
mapredInputFormat, Class<K> key, Class<V> value, String inputPath)
{code}
Will add two override methods named: {{readHadoopFiles}}
{code:java}
//input paths: commaSeparatedPaths
public static <K, V> HadoopInputFormat<K, V>
readHadoopFiles(org.apache.hadoop.mapred.FileInputFormat<K, V>
mapredInputFormat, Class<K> key, Class<V> value, String commaSeparatedPaths)
//input paths:
public static <K, V> HadoopInputFormat<K, V>
readHadoopFiles(org.apache.hadoop.mapred.FileInputFormat<K, V>
mapredInputFormat, Class<K> key, Class<V> value, Path[] inputPaths){code}
What do you think?
> Support read a whole directory or multiple input data files for read apis of
> HadoopInputs
> -----------------------------------------------------------------------------------------
>
> Key: FLINK-12008
> URL: https://issues.apache.org/jira/browse/FLINK-12008
> Project: Flink
> Issue Type: Improvement
> Components: Connectors / Hadoop Compatibility
> Reporter: vinoyang
> Assignee: vinoyang
> Priority: Major
>
> Currently, the read APIs provided by {{HadoopInputs}} only can read one path.
> I think it's not strong enough. We should support read a whole directory or
> multiple input files.
> Hadoop provides {{org.apache.hadoop.mapred.FileInputFormat.setInputPaths()}}
> to support this requirement.
> Spark's {{sequenceFile}} API calls this
> API([https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L1049].)
> Flink calls {{org.apache.hadoop.mapred.FileInputFormat.addInputPath}} which
> only supports one path.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)