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

Function invoke_chunk

nanofi/src/api/nanofi.cpp:724–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722}
723
724flow_file_record *invoke_chunk(standalone_processor* proc, uint8_t* buf, uint64_t size) {
725 if (proc == nullptr || buf == nullptr || size == 0) {
726 return nullptr;
727 }
728
729 auto plan = ExecutionPlan::getPlan(proc->getUUID());
730 if (!plan) {
731 // This is not a standalone processor, shouldn't be used with invoke!
732 return nullptr;
733 }
734
735 plan->reset();
736
737 auto ff_data = std::make_shared<flowfile_input_params>();
738 ff_data->content_stream = std::make_shared<minifi::io::BufferStream>();
739 ff_data->content_stream->write(buf, gsl::narrow<int>(size));
740
741 plan->runNextProcessor(nullptr, ff_data);
742 while (plan->runNextProcessor()) {
743 }
744
745 return flowfile_to_record(plan->getCurrentFlowFile(), plan.get());
746}
747
748flow_file_record *invoke_file(standalone_processor* proc, const char* path) {
749 NULL_CHECK(nullptr, path, proc);

Callers 1

invoke_fileFunction · 0.85

Calls 7

flowfile_to_recordFunction · 0.85
getUUIDMethod · 0.45
resetMethod · 0.45
writeMethod · 0.45
runNextProcessorMethod · 0.45
getCurrentFlowFileMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected