@@ -0,0 +1,992 @@
+package com.jasongj.spark.model;%0A%0Aimport com.jasongj.spark.reader.BucketReaderIterator;%0Aimport com.jasongj.spark.reader.ParquetBucketReaderIterator;%0Aimport com.jasongj.spark.reader.TextBucketReaderIterator;%0Aimport lombok.Getter;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0A/**%0A * Created by Jason Guo (jason.guo.vip@gmail.com)%0A */%0Apublic enum DataType %7B%0A    TEXT(TextBucketReaderIterator.class, Arrays.asList(%22org.apache.hadoop.mapred.TextInputFormat%22, %22org.apache.hadoop.mapreduce.lib.input.TextInputFormat%22)),%0A    PARQUET(ParquetBucketReaderIterator.class, Arrays.asList(%22org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat%22, %22org.apache.parquet.hadoop.ParquetInputFormat%22));%0A%0A    @Getter%0A    private Class%3C? extends BucketReaderIterator%3E readClass;%0A    @Getter private List%3CString%3E inputFormats;%0A%0A    DataType(Class%3C? extends BucketReaderIterator%3E readClass, List%3CString%3E inputFormats) %7B%0A        this.readClass = readClass;%0A        this.inputFormats = inputFormats;%0A    %7D%0A%7D

Create DataType enumeration so that data type can be detected from the input/output format