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

Python Processor erroring when creating custom relationships

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-M3
    • Core Framework
    • None

    Description

      From apache Slack thread (https://apachenifi.slack.com/archives/C0L9VCD47/p1706176890922519):

      Hello, I am trying to test some custom python processors with nifi 2.0.0-M1
      It works fine except when I try to add custom relationships to it (other than the default success, failure and original).
      Here's what I am trying:

              self.matched = Relationship("matched", "flowfiles having a match with the regex")
              self.unmatched = Relationship("unmatched", "flowfiles not having any match with regex")
              self.failure = Relationship("failure", "flowfiles for which process errored while matching")
      
              self.relationships = {self.matched, self.unmatched, self.failure}
      

      I get py4j complaining about AttributeError: 'set' object has no attribute '_get_object_id'
      which seems like the auto conversion of Python to java container is not happening for "Relationship" class. Any idea what could be wrong here?

      The problem appears to be that Relationships created are of type nifiapi.Relationship but that is being sent back to the Java side without being converted into a org.apache.nifi.processor.Relationship

      Attachments

        Issue Links

          Activity

            People

              markap14 Mark Payne
              markap14 Mark Payne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m