千家信息网

Hadoop2.6.0中InputFormat和OutputFormat的用法示例

发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,这篇文章给大家分享的是有关Hadoop2.6.0中InputFormat和OutputFormat的用法示例的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。java.lang
千家信息网最后更新 2025年02月01日Hadoop2.6.0中InputFormat和OutputFormat的用法示例

这篇文章给大家分享的是有关Hadoop2.6.0中InputFormat和OutputFormat的用法示例的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

java.lang.Object    org.apache.hadoop.mapreduce.InputFormat        org.apache.hadoop.mapreduce.lib.db.DBInputFormat            DataDrivenDBInputFormat                OracleDataDrivenDBInputFormat        org.apache.hadoop.mapreduce.lib.input.FileInputFormat            CombineFileInputFormat                CombineSequenceFileInputFormat                CombineTextInputFormat            FixedLengthInputFormat            KeyValueTextInputFormat            NLineInputFormat            SequenceFileInputFormat            TextInputFormat

InputFormat

public abstract class InputFormat {  public abstract List getSplits(JobContext context) throws IOException, InterruptedException;                                 public abstract RecordReader createRecordReader(InputSplit split,TaskAttemptContext context)                                                        throws IOException,  InterruptedException;}

1、FileInputFormat

1.1 TextInputFormat

1.2 KeyValueTextInputFormat

1.3 SequenceFileInputFormat

1.4 CombineFileInputFormat

1.5 FixedLengthInputFormat

1.6 NLineInputFormat

2、DBInputFormat

2.1 DataDrivenDBInputFormat

2.1.1 OracleDataDrivenDBInputFormat

OutputFormat

public abstract class OutputFormat {    public abstract RecordWriter getRecordWriter(TaskAttemptContext context                    ) throws IOException, InterruptedException;                        public abstract RecordWriter getRecordWriter(TaskAttemptContext context                    ) throws IOException, InterruptedException;                        public abstract OutputCommitter getOutputCommitter(TaskAttemptContext context                    ) throws IOException, InterruptedException;}

感谢各位的阅读!关于"Hadoop2.6.0中InputFormat和OutputFormat的用法示例"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

0