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

Function create_processor

nanofi/src/api/nanofi.cpp:134–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134standalone_processor * create_processor(const char *name, nifi_instance * instance) {
135 NULL_CHECK(nullptr, name);
136 auto ptr = ExecutionPlan::createProcessor(name, name);
137 if (!ptr) {
138 return nullptr;
139 }
140 if (instance == NULL) {
141 nifi_port port;
142 auto port_str = utils::IdGenerator::getIdGenerator()->generate().to_string();
143 port.port_id = const_cast<char*>(port_str.c_str());
144 instance = create_instance("internal_standalone", &port);
145 }
146 auto flow = create_new_flow(instance);
147 std::shared_ptr<ExecutionPlan> plan(flow);
148 plan->addProcessor(ptr, name);
149 ExecutionPlan::addProcessorWithPlan(ptr->getUUID(), plan);
150 return static_cast<standalone_processor*>(ptr.get());
151}
152
153void initialize_content_repo(processor_context * ctx, const char * uuid) {
154 if (ctx->isInitialized()) {

Callers 4

setup_nifi_processorFunction · 0.85
CAPITests.cppFile · 0.85
mainFunction · 0.85

Calls 8

create_instanceFunction · 0.85
create_new_flowFunction · 0.85
c_strMethod · 0.80
to_stringMethod · 0.45
generateMethod · 0.45
addProcessorMethod · 0.45
getUUIDMethod · 0.45
getMethod · 0.45

Tested by 1