[ https://issues.apache.org/jira/browse/MINIFICPP-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16459801#comment-16459801 ]
ASF GitHub Bot commented on MINIFICPP-403: ------------------------------------------ Github user minifirocks commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/313#discussion_r185257853 --- Diff: libminifi/test/resources/TestHTTPGet.yml --- @@ -19,6 +19,7 @@ Flow Controller: name: MiNiFi Flow id: 2438e3c8-015a-1000-79ca-83af40ec1990 + version: 1 --- End diff -- @phrocker that's flow config yml version, i thought it refer to the the flow version. when you update the YML file, flow version change also > Enable tagging of flowfiles with flow metadata information in C++ > ----------------------------------------------------------------- > > Key: MINIFICPP-403 > URL: https://issues.apache.org/jira/browse/MINIFICPP-403 > Project: NiFi MiNiFi C++ > Issue Type: Improvement > Affects Versions: 1.0.0 > Reporter: bqiu > Assignee: bqiu > Priority: Minor > Fix For: 1.0.0 > > > Provide framework level support to tag flowfiles with metadata about the flow > that created them. > Design proposal > Right now, MiNiFi support core attributes likeĀ > // FlowFile Attribute > enum FlowAttribute { > // The flowfile's path indicates the relative directory to which a FlowFile > belongs and does not contain the filename > PATH = 0, > // The flowfile's absolute path indicates the absolute directory to which a > FlowFile belongs and does not contain the filename > ABSOLUTE_PATH, > // The filename of the FlowFile. The filename should not contain any > directory structure. > FILENAME, > // A unique UUID assigned to this FlowFile. > UUID, > // A numeric value indicating the FlowFile priority > priority, > // The MIME Type of this FlowFile > MIME_TYPE, > // Specifies the reason that a FlowFile is being discarded > DISCARD_REASON, > // Indicates an identifier other than the FlowFile's UUID that is known to > refer to this FlowFile. > ALTERNATE_IDENTIFIER, > MAX_FLOW_ATTRIBUTES > }; > So one approach is in the flow YAML file, specific the list of core flow > attributes along with the processors that inject/import/create the flow files. > When flow was created/imported/injected by this processor, we can apply these > core attributes to the new flow. > Also user can define their own core attributes template and EL for populate > value for these core attributes, for example protocol, TTL, record route > (expected route), key, version, etc. > In current implementation, FILENAME, PATH and UUID are required attributes > when flow was created, others are optional > // Populate the default attributes > addKeyedAttribute(FILENAME, > std::to_string(getTimeNano())); > addKeyedAttribute(PATH, DEFAULT_FLOWFILE_PATH); > addKeyedAttribute(UUID, > getUUIDStr()) > So if user specify the optional meta flow info section for the processor with > the key/value pairs as above, MiNiFI will add these key attributes to the > flow when flow was created by this processor. -- This message was sent by Atlassian JIRA (v7.6.3#76005)