| 441 | } |
| 442 | |
| 443 | uint64_t WriterImpl::writeIntermediateFooter() { |
| 444 | if (stripeRows_ > 0) { |
| 445 | writeStripe(); |
| 446 | } |
| 447 | if (stripesAtLastFlush_ != fileFooter_.stripes_size()) { |
| 448 | writeMetadata(); |
| 449 | writeFileFooter(); |
| 450 | writePostscript(); |
| 451 | stripesAtLastFlush_ = fileFooter_.stripes_size(); |
| 452 | outStream_->flush(); |
| 453 | lastFlushOffset_ = outStream_->getLength(); |
| 454 | currentOffset_ = lastFlushOffset_; |
| 455 | // init stripe now that we adjusted the currentOffset |
| 456 | initStripe(); |
| 457 | } |
| 458 | return lastFlushOffset_; |
| 459 | } |
| 460 | |
| 461 | void WriterImpl::addUserMetadata(const std::string& name, const std::string& value) { |
| 462 | proto::UserMetadataItem* userMetadataItem = fileFooter_.add_metadata(); |