mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-03 06:21:01 +08:00
fix orcFileStartRead
This commit is contained in:
parent
d4d1ea6a15
commit
e2dcbcd532
@ -331,9 +331,11 @@ public class DFSUtil {
|
|||||||
//If the network disconnected, will retry 45 times, each time the retry interval for 20 seconds
|
//If the network disconnected, will retry 45 times, each time the retry interval for 20 seconds
|
||||||
//Each file as a split
|
//Each file as a split
|
||||||
//TODO multy threads
|
//TODO multy threads
|
||||||
InputSplit[] splits = in.getSplits(conf, 1);
|
// OrcInputFormat getSplits params numSplits not used, splits size = block numbers
|
||||||
|
InputSplit[] splits = in.getSplits(conf, -1);
|
||||||
RecordReader reader = in.getRecordReader(splits[0], conf, Reporter.NULL);
|
for (InputSplit split : splits) {
|
||||||
|
{
|
||||||
|
RecordReader reader = in.getRecordReader(split, conf, Reporter.NULL);
|
||||||
Object key = reader.createKey();
|
Object key = reader.createKey();
|
||||||
Object value = reader.createValue();
|
Object value = reader.createValue();
|
||||||
// 获取列信息
|
// 获取列信息
|
||||||
@ -351,6 +353,8 @@ public class DFSUtil {
|
|||||||
taskPluginCollector, isReadAllColumns, nullFormat);
|
taskPluginCollector, isReadAllColumns, nullFormat);
|
||||||
}
|
}
|
||||||
reader.close();
|
reader.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String message = String.format("从orcfile文件路径[%s]中读取数据发生异常,请联系系统管理员。"
|
String message = String.format("从orcfile文件路径[%s]中读取数据发生异常,请联系系统管理员。"
|
||||||
, sourceOrcFilePath);
|
, sourceOrcFilePath);
|
||||||
|
Loading…
Reference in New Issue
Block a user