public StripeFooter readStripeFooter(StripeInformation stripe, AggregatedMemoryContext systemMemoryUsage) throws IOException { long offset = stripe.getOffset() + stripe.getIndexLength() + stripe.getDataLength(); int tailLength = toIntExact(stripe.getFooterLength()); // read the footer byte[] tailBuffer = new byte[tailLength]; orcDataSource.readFully(offset, tailBuffer); try (InputStream inputStream = new OrcInputStream(orcDataSource.getId(), Slices.wrappedBuffer(tailBuffer).getInput(), decompressor, systemMemoryUsage, tailLength)) { return metadataReader.readStripeFooter(types, inputStream); } }
private static OrcProto.StripeInformation toStripeInformation(StripeInformation stripe) { return OrcProto.StripeInformation.newBuilder() .setNumberOfRows(stripe.getNumberOfRows()) .setOffset(stripe.getOffset()) .setIndexLength(stripe.getIndexLength()) .setDataLength(stripe.getDataLength()) .setFooterLength(stripe.getFooterLength()) .build(); }
private static DwrfProto.StripeInformation toStripeInformation(StripeInformation stripe) { return DwrfProto.StripeInformation.newBuilder() .setNumberOfRows(stripe.getNumberOfRows()) .setOffset(stripe.getOffset()) .setIndexLength(stripe.getIndexLength()) .setDataLength(stripe.getDataLength()) .setFooterLength(stripe.getFooterLength()) .build(); }
orcDataSource.readFully(stripe.getOffset() + stripe.getIndexLength() + stripe.getDataLength(), tailBuffer); try (InputStream inputStream = new OrcInputStream(orcDataSource.getId(), Slices.wrappedBuffer(tailBuffer).getInput(), Optional.empty(), newSimpleAggregatedMemoryContext(), tailBuffer.length)) { StripeFooter stripeFooter = ORC.createMetadataReader().readStripeFooter(footer.getTypes(), inputStream);
public StripeFooter readStripeFooter(StripeInformation stripe, AbstractAggregatedMemoryContext systemMemoryUsage) throws IOException { long offset = stripe.getOffset() + stripe.getIndexLength() + stripe.getDataLength(); int tailLength = Ints.checkedCast(stripe.getFooterLength()); // read the footer byte[] tailBuffer = new byte[tailLength]; orcDataSource.readFully(offset, tailBuffer); try (InputStream inputStream = new OrcInputStream(orcDataSource.toString(), Slices.wrappedBuffer(tailBuffer).getInput(), compressionKind, bufferSize, systemMemoryUsage)) { return metadataReader.readStripeFooter(types, inputStream); } }
public StripeFooter readStripeFooter(StripeInformation stripe, AggregatedMemoryContext systemMemoryUsage) throws IOException { long offset = stripe.getOffset() + stripe.getIndexLength() + stripe.getDataLength(); int tailLength = toIntExact(stripe.getFooterLength()); // read the footer byte[] tailBuffer = new byte[tailLength]; orcDataSource.readFully(offset, tailBuffer); try (InputStream inputStream = new OrcInputStream(orcDataSource.getId(), Slices.wrappedBuffer(tailBuffer).getInput(), decompressor, systemMemoryUsage, tailLength)) { return metadataReader.readStripeFooter(types, inputStream); } }
private static DwrfProto.StripeInformation toStripeInformation(StripeInformation stripe) { return DwrfProto.StripeInformation.newBuilder() .setNumberOfRows(stripe.getNumberOfRows()) .setOffset(stripe.getOffset()) .setIndexLength(stripe.getIndexLength()) .setDataLength(stripe.getDataLength()) .setFooterLength(stripe.getFooterLength()) .build(); }
private static OrcProto.StripeInformation toStripeInformation(StripeInformation stripe) { return OrcProto.StripeInformation.newBuilder() .setNumberOfRows(stripe.getNumberOfRows()) .setOffset(stripe.getOffset()) .setIndexLength(stripe.getIndexLength()) .setDataLength(stripe.getDataLength()) .setFooterLength(stripe.getFooterLength()) .build(); }
orcDataSource.readFully(stripe.getOffset() + stripe.getIndexLength() + stripe.getDataLength(), tailBuffer); try (InputStream inputStream = new OrcInputStream(orcDataSource.getId(), Slices.wrappedBuffer(tailBuffer).getInput(), Optional.empty(), newSimpleAggregatedMemoryContext(), tailBuffer.length)) { StripeFooter stripeFooter = ORC.createMetadataReader().readStripeFooter(footer.getTypes(), inputStream);