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

Method DeSerialize

libminifi/src/FlowFileRecord.cpp:51–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51std::shared_ptr<FlowFileRecord> FlowFileRecord::DeSerialize(const std::string& key, const std::shared_ptr<core::Repository>& flowRepository,
52 const std::shared_ptr<core::ContentRepository>& content_repo, utils::Identifier& container) {
53 std::string value;
54
55 if (!flowRepository->Get(key, value)) {
56 logger_->log_error("NiFi FlowFile Store event %s can not found", key);
57 return nullptr;
58 }
59 io::BufferStream stream((const uint8_t*) value.data(), gsl::narrow<int>(value.length()));
60
61 auto record = DeSerialize(stream, content_repo, container);
62
63 if (record) {
64 logger_->log_debug("NiFi FlowFile retrieve uuid %s size " "%" PRIu64 " connection %s success", record->getUUIDStr(), stream.size(), container.to_string());
65 } else {
66 logger_->log_debug("Couldn't deserialize FlowFile %s from the stream of size " "%" PRIu64, key, stream.size());
67 }
68
69 return record;
70}
71
72bool FlowFileRecord::Serialize(io::OutputStream &outStream) {
73 int ret;

Callers

nothing calls this directly

Calls 8

log_errorMethod · 0.80
lengthMethod · 0.80
log_debugMethod · 0.80
GetMethod · 0.45
getUUIDStrMethod · 0.45
sizeMethod · 0.45
to_stringMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected