Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-4004

Refactor RecordReaderFactory and SchemaAccessStrategy to be used without incoming FlowFile

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.4.0
    • Component/s: Extensions
    • Labels:
      None

      Description

      Current RecordReaderFactory and SchemaAccessStrategy implementation assumes there's always an incoming FlowFile available, and use it to resolve Record Schema.

      That is fine for components those convert or update incoming FlowFiles, however there are other components those does not have any incoming FlowFiles, for example, ConsumeKafkaRecord_0_10. Typically, ones fetches data from external system do not have incoming FlowFile. And current API doesn't fit well with these as it requires a FlowFile.

      In fact, ConsumeKafkaRecord creates a temporal FlowFile only to get RecordSchema. This should be avoided as we expect more components start using Record reader mechanism.

      This JIRA proposes refactoring current API to allow accessing RecordReaders without needing an incoming FlowFile.
      Additionally, since there's Schema Access Strategy that requires incoming FlowFile containing attribute values to access schema registry, it'd be useful if we could tell user when such RecordReader is specified that it can't be used.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ijokarumawak Koji Kawamura
                Reporter:
                ijokarumawak Koji Kawamura
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: