private List<OrcSplit> generateSplitsFromPpd(SplitInfos ppdResult) throws IOException { OffsetAndLength current = new OffsetAndLength(); List<OrcSplit> splits = new ArrayList<>(ppdResult.getInfosCount()); int lastIdx = -1; for (Metastore.SplitInfo si : ppdResult.getInfosList()) { int index = si.getIndex(); if (lastIdx >= 0 && lastIdx + 1 != index && current.offset != -1) { // Create split for the previous unfinished stripe. splits.add(createSplit(current.offset, current.length, orcTail)); current.offset = -1; } lastIdx = index; String debugStr = null; if (LOG.isDebugEnabled()) { debugStr = current.toString(); } current = generateOrUpdateSplit(splits, current, si.getOffset(), si.getLength(), null); if (LOG.isDebugEnabled()) { LOG.debug("Updated split from {" + index + ": " + si.getOffset() + ", " + si.getLength() + "} and "+ debugStr + " to " + current); } } generateLastSplit(splits, current, null); return splits; }
private List<OrcSplit> generateSplitsFromPpd(SplitInfos ppdResult) throws IOException { OffsetAndLength current = new OffsetAndLength(); List<OrcSplit> splits = new ArrayList<>(ppdResult.getInfosCount()); int lastIdx = -1; for (Metastore.SplitInfo si : ppdResult.getInfosList()) { int index = si.getIndex(); if (lastIdx >= 0 && lastIdx + 1 != index && current.offset != -1) { // Create split for the previous unfinished stripe. splits.add(createSplit(current.offset, current.length, orcTail)); current.offset = -1; } lastIdx = index; String debugStr = null; if (LOG.isDebugEnabled()) { debugStr = current.toString(); } current = generateOrUpdateSplit(splits, current, si.getOffset(), si.getLength(), null); if (LOG.isDebugEnabled()) { LOG.debug("Updated split from {" + index + ": " + si.getOffset() + ", " + si.getLength() + "} and "+ debugStr + " to " + current); } } generateLastSplit(splits, current, null); return splits; }