currentStripe.rowCount = si.getNumberOfRows();
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; }
long footerLength = rawWriter.getPos() - start - dataSize - indexSize; OrcProto.StripeInformation dirEntry = OrcProto.StripeInformation.newBuilder() .setOffset(start) .setNumberOfRows(rowsInStripe)
long footerLength = rawWriter.getPos() - start - dataSize - indexSize; OrcProto.StripeInformation dirEntry = OrcProto.StripeInformation.newBuilder() .setOffset(start) .setNumberOfRows(rowsInStripe)
currentStripe.rowCount = si.getNumberOfRows();
.newBuilder() .setOffset(start) .setNumberOfRows(rowsInStripe)
.newBuilder() .setOffset(start) .setNumberOfRows(rowsInStripe)
OrcProto.StripeInformation.newBuilder() .setNumberOfRows(rowsInStripe); physicalWriter.finalizeStripe(builder, dirEntry);
public org.apache.orc.OrcProto.StripeInformation buildPartial() { org.apache.orc.OrcProto.StripeInformation result = new org.apache.orc.OrcProto.StripeInformation(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.offset_ = offset_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.indexLength_ = indexLength_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.dataLength_ = dataLength_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.footerLength_ = footerLength_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.numberOfRows_ = numberOfRows_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@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; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt64(1, offset_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt64(2, indexLength_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt64(3, dataLength_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeUInt64(4, footerLength_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeUInt64(5, numberOfRows_); } getUnknownFields().writeTo(output); }
public Builder mergeFrom(org.apache.orc.OrcProto.StripeInformation other) { if (other == org.apache.orc.OrcProto.StripeInformation.getDefaultInstance()) return this; if (other.hasOffset()) { setOffset(other.getOffset()); } if (other.hasIndexLength()) { setIndexLength(other.getIndexLength()); } if (other.hasDataLength()) { setDataLength(other.getDataLength()); } if (other.hasFooterLength()) { setFooterLength(other.getFooterLength()); } if (other.hasNumberOfRows()) { setNumberOfRows(other.getNumberOfRows()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.orc.OrcProto.StripeInformation prototype) {
public org.apache.orc.OrcProto.StripeInformation getDefaultInstanceForType() { return org.apache.orc.OrcProto.StripeInformation.getDefaultInstance(); }
@Override public long getFooterLength() { return stripe.getFooterLength(); }
@Override public long getDataLength() { return stripe.getDataLength(); }
@Override public long getLength() { return stripe.getDataLength() + getIndexLength() + getFooterLength(); }
@Override public long getNumberOfRows() { return stripe.getNumberOfRows(); }
@Override public long getIndexLength() { return stripe.getIndexLength(); }