ExcelFileInputFormat.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:hadoopoffice 作者:
@Override
public  RecordReader<Text,ArrayWritable> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException {
/** Create reader **/
try {
         // send configuration option to ms excel. The format of the Excel (old vs new) is detected automaitcally
        job.set(HadoopOfficeReadConfiguration.CONF_MIMETYPE,"ms-excel");
        return new ExcelRecordReader( (FileSplit) split,job,reporter);
    } catch (FormatNotUnderstoodException e) {
        // log
        LOGIF.error(e);
    } catch (GeneralSecurityException gse) {
        LOGIF.error(gse);
    }
return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号