MCPcopy Index your code
hub / github.com/apache/orc / writeFooter

Method writeFooter

java/core/src/java/org/apache/orc/impl/WriterImpl.java:690–719  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

688 }
689
690 private long writeFooter() throws IOException {
691 writeMetadata();
692 OrcProto.Footer.Builder builder = OrcProto.Footer.newBuilder();
693 builder.setNumberOfRows(rowCount);
694 builder.setRowIndexStride(rowIndexStride);
695 rawDataSize = computeRawDataSize();
696 // serialize the types
697 writeTypes(builder, schema);
698 builder.setCalendar(useProlepticGregorian
699 ? OrcProto.CalendarKind.PROLEPTIC_GREGORIAN
700 : OrcProto.CalendarKind.JULIAN_GREGORIAN);
701 // add the stripe information
702 for(OrcProto.StripeInformation stripe: stripes) {
703 builder.addStripes(stripe);
704 }
705 // add the column statistics
706 treeWriter.writeFileStatistics();
707 // add all of the user metadata
708 for(Map.Entry<String, ByteString> entry: userMetadata.entrySet()) {
709 builder.addMetadata(OrcProto.UserMetadataItem.newBuilder()
710 .setName(entry.getKey()).setValue(entry.getValue()));
711 }
712 if (encryption.length > 0) {
713 builder.setEncryption(writeEncryptionFooter());
714 }
715 builder.setWriter(OrcFile.WriterImplementation.ORC_JAVA.getId());
716 builder.setSoftwareVersion(OrcUtils.getOrcVersion());
717 physicalWriter.writeFileFooter(builder);
718 return writePostScript();
719 }
720
721 @Override
722 public TypeDescription getSchema() {

Callers 2

closeMethod · 0.95

Calls 13

writeMetadataMethod · 0.95
computeRawDataSizeMethod · 0.95
writeTypesMethod · 0.95
writeEncryptionFooterMethod · 0.95
getOrcVersionMethod · 0.95
writePostScriptMethod · 0.95
newBuilderMethod · 0.80
setEncryptionMethod · 0.80
writeFileStatisticsMethod · 0.65
writeFileFooterMethod · 0.65
getKeyMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected