MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / preprocessFlowFile

Method preprocessFlowFile

extensions/libarchive/BinFiles.cpp:134–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void BinFiles::preprocessFlowFile(core::ProcessContext* /*context*/, core::ProcessSession* /*session*/, std::shared_ptr<core::FlowFile> flow) {
135 // handle backward compatibility with old segment attributes
136 std::string value;
137 if (!flow->getAttribute(BinFiles::FRAGMENT_COUNT_ATTRIBUTE, value) && flow->getAttribute(BinFiles::SEGMENT_COUNT_ATTRIBUTE, value)) {
138 flow->setAttribute(BinFiles::FRAGMENT_COUNT_ATTRIBUTE, value);
139 }
140 if (!flow->getAttribute(BinFiles::FRAGMENT_INDEX_ATTRIBUTE, value) && flow->getAttribute(BinFiles::SEGMENT_INDEX_ATTRIBUTE, value)) {
141 flow->setAttribute(BinFiles::FRAGMENT_INDEX_ATTRIBUTE, value);
142 }
143 if (!flow->getAttribute(BinFiles::FRAGMENT_ID_ATTRIBUTE, value) && flow->getAttribute(BinFiles::SEGMENT_ID_ATTRIBUTE, value)) {
144 flow->setAttribute(BinFiles::FRAGMENT_ID_ATTRIBUTE, value);
145 }
146}
147
148void BinManager::gatherReadyBins() {
149 std::lock_guard < std::mutex > lock(mutex_);

Callers

nothing calls this directly

Calls 2

getAttributeMethod · 0.45
setAttributeMethod · 0.45

Tested by

no test coverage detected