throws IOException { List<ColumnEncoding> allEnc = footer.getColumnsList(); OrcProto.StripeInformation si = dirEntry.build(); if (LlapIoImpl.LOG.isTraceEnabled()) { LlapIoImpl.LOG.trace(("Finalizing stripe " + footer.build() + " => " + si)
private List<StripeInformation> createStripes(long... rowCounts) { long offset = 0; List<StripeInformation> result = new ArrayList<StripeInformation>(rowCounts.length); for(long count: rowCounts) { OrcProto.StripeInformation.Builder stripe = OrcProto.StripeInformation.newBuilder(); stripe.setDataLength(800).setIndexLength(100).setFooterLength(100) .setNumberOfRows(count).setOffset(offset); offset += 1000; result.add(new ReaderImpl.StripeInformationImpl(stripe.build())); } return result; }
throws IOException { List<ColumnEncoding> allEnc = footer.getColumnsList(); OrcProto.StripeInformation si = dirEntry.build(); if (LlapIoImpl.LOG.isTraceEnabled()) { LlapIoImpl.LOG.trace(("Finalizing stripe " + footer.build() + " => " + si)
.setIndexLength(indexSize) .setDataLength(dataSize) .setFooterLength(footerLength).build(); stripes.add(dirEntry); rowCount += rowsInStripe;
.setIndexLength(indexSize) .setDataLength(dataSize) .setFooterLength(footerLength).build(); stripes.add(dirEntry); rowCount += rowsInStripe;
.setDataLength(stripeInfo.getDataLength()) .setFooterLength(stripeInfo.getFooterLength()) .build(); stripes.add(dirEntry);
.setDataLength(stripeInfo.getDataLength()) .setFooterLength(stripeInfo.getFooterLength()) .build(); stripes.add(dirEntry);
stripes.add(dirEntry.build()); rowCount += rowsInStripe; rowsInStripe = 0;
@Override public void appendStripe(byte[] stripe, int offset, int length, StripeInformation stripeInfo, OrcProto.StripeStatistics stripeStatistics) throws IOException { checkArgument(stripe != null, "Stripe must not be null"); checkArgument(length <= stripe.length, "Specified length must not be greater specified array length"); checkArgument(stripeInfo != null, "Stripe information must not be null"); checkArgument(stripeStatistics != null, "Stripe statistics must not be null"); rowsInStripe = stripeInfo.getNumberOfRows(); // update stripe information OrcProto.StripeInformation.Builder dirEntry = OrcProto.StripeInformation .newBuilder() .setNumberOfRows(rowsInStripe) .setIndexLength(stripeInfo.getIndexLength()) .setDataLength(stripeInfo.getDataLength()) .setFooterLength(stripeInfo.getFooterLength()); physicalWriter.appendRawStripe(ByteBuffer.wrap(stripe, offset, length), dirEntry); // since we have already written the stripe, just update stripe statistics treeWriter.updateFileStatistics(stripeStatistics); fileMetadata.addStripeStats(stripeStatistics); stripes.add(dirEntry.build()); // reset it after writing the stripe rowCount += rowsInStripe; rowsInStripe = 0; }
/** * <code>repeated .orc.proto.StripeInformation stripes = 3;</code> */ public Builder setStripes( int index, org.apache.orc.OrcProto.StripeInformation.Builder builderForValue) { if (stripesBuilder_ == null) { ensureStripesIsMutable(); stripes_.set(index, builderForValue.build()); onChanged(); } else { stripesBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .orc.proto.StripeInformation stripes = 3;</code> */ public Builder addStripes( org.apache.orc.OrcProto.StripeInformation.Builder builderForValue) { if (stripesBuilder_ == null) { ensureStripesIsMutable(); stripes_.add(builderForValue.build()); onChanged(); } else { stripesBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated .orc.proto.StripeInformation stripes = 3;</code> */ public Builder addStripes( int index, org.apache.orc.OrcProto.StripeInformation.Builder builderForValue) { if (stripesBuilder_ == null) { ensureStripesIsMutable(); stripes_.add(index, builderForValue.build()); onChanged(); } else { stripesBuilder_.addMessage(index, builderForValue.build()); } return this; } /**