@Override
public RecordReader<Text,ArrayWritable> createRecordReader(InputSplit split, TaskAttemptContext ctx) throws IOException {
/** Create reader **/
try {
// send configuration option to ms excel. The format of the Excel (old vs new) is detected automaitcally
ctx.getConfiguration().set(HadoopOfficeReadConfiguration.CONF_MIMETYPE,"ms-excel");
return new ExcelRecordReader(ctx.getConfiguration(), (FileSplit) split);
} catch (FormatNotUnderstoodException e) {
// log
LOG.error(e);
} catch (GeneralSecurityException gse) {
LOG.error(gse);
}
return null;
}
ExcelFileInputFormat.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:hadoopoffice
作者:
评论列表
文章目录