byte[] buffer = new byte[(int) footerLength]; inputStream.readFully(offset + indexLength + dataLength, buffer); OrcProto.StripeFooter footer = OrcProto.StripeFooter.parseFrom(buffer); List<OrcProto.Stream> streams = footer.getStreamsList(); for (OrcProto.Stream stream : streams)
@Override public OrcProto.StripeFooter readStripeFooter(StripeInformation stripe) throws IOException { if (file == null) { open(); } long offset = stripe.getOffset() + stripe.getIndexLength() + stripe.getDataLength(); int tailLength = (int) stripe.getFooterLength(); // read the footer ByteBuffer tailBuf = ByteBuffer.allocate(tailLength); file.readFully(offset, tailBuf.array(), tailBuf.arrayOffset(), tailLength); return OrcProto.StripeFooter.parseFrom( InStream.createCodedInputStream("footer", ReaderImpl.singleton( new BufferChunk(tailBuf, 0)), tailLength, codec, bufferSize)); }
private OrcProto.StripeFooter buildStripeFooter( List<DiskRange> bcs, int len, CompressionCodec codec, int bufferSize) throws IOException { return OrcProto.StripeFooter.parseFrom(InStream.createCodedInputStream( "footer", bcs, len, codec, bufferSize)); }
private OrcProto.StripeFooter buildStripeFooter( List<DiskRange> bcs, int len, CompressionCodec codec, int bufferSize) throws IOException { return OrcProto.StripeFooter.parseFrom(InStream.createCodedInputStream( "footer", bcs, len, codec, bufferSize)); }