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; }
public Builder mergeFrom(org.apache.hadoop.hive.metastore.Metastore.SplitInfo other) { if (other == org.apache.hadoop.hive.metastore.Metastore.SplitInfo.getDefaultInstance()) return this; if (other.hasOffset()) { setOffset(other.getOffset()); } if (other.hasLength()) { setLength(other.getLength()); } if (other.hasIndex()) { setIndex(other.getIndex()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hive.metastore.Metastore.SplitInfo other) { if (other == org.apache.hadoop.hive.metastore.Metastore.SplitInfo.getDefaultInstance()) return this; if (other.hasOffset()) { setOffset(other.getOffset()); } if (other.hasLength()) { setLength(other.getLength()); } if (other.hasIndex()) { setIndex(other.getIndex()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }