Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

Solved Go to solution

I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

Are you declaring any relationships? Don't forget to add it to the list of supported ones returned from one of the callbacks. If you can post a link or share the code somewhere, that would be very helpful.

View solution in original post

6 REPLIES 6
Highlighted

Re: I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

Hi, is it a custom processor or one of the standard ones?

Highlighted

Re: I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

Its a custom processor.

Highlighted

Re: I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

Are you declaring any relationships? Don't forget to add it to the list of supported ones returned from one of the callbacks. If you can post a link or share the code somewhere, that would be very helpful.

View solution in original post

Highlighted

Re: I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

Just added relevant lines here.

public static final Relationship SUCCESS = new Relationship.Builder().name("SUCCESS")

.description("Success relationship").build();

if (msgText != null) {

FlowFile flowFile = session.create();

flowFile = session.write(flowFile, new OutputStreamCallback() {

public void process(final OutputStream out) throws IOException {

try {

out.write(msgText.getText().getBytes());

} catch (Exception e) {

e.printStackTrace();

}

}

});

session.getProvenanceReporter().receive(flowFile, context.getProperty("MyProp").getValue());

session.transfer(flowFile, REL_SUCCESS);

}

queueConn.close();

session.commit();

Highlighted

Re: I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

Can you check you properly publish this relationship, too? E.g. see how I am doing it here (and the getRelationships() method that follows) https://github.com/aperepel/nifi-csv-bundle/blob/master/nifi-csv-processors/src/main/java/org/apache...

Highlighted

Re: I am getting the following exception building data flow in NiFi "Processor does not support any relationships" .

Thank you Andrew, it helped me resolving my issue.

Don't have an account?
Coming from Hortonworks? Activate your account here