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.

anyDelineatedValue nifi expression is giving ArrayIndexOutOfBoundException

Solved Go to solution
Highlighted

anyDelineatedValue nifi expression is giving ArrayIndexOutOfBoundException

Rising Star

Hello,


I am observing quite strange behaviour of anyDelineatedValue expression when I use it with 'OR' operation.

If I use 'AND' operation there is no issues.


Input attribute value:

org.entitlement.list=AA,CC,DD,FF


Expression used in RouteOnAttribte/UpdateAttribute processor :

${anyDelineatedValue("${org.entitlement.list}", ","):equals('BB'):or(${anyDelineatedValue("${org.entitlement.list}", ","):contains('EE')})}


Above expression is giving ArrayIndexOutOfBoundException for OR operation for the given input (where both the values which expression is looking is not present)

If I use 'AND' operation expression works fine. What is the difference here?


If I pass BB or EE in the input then expression wont give exception !

Looks like defect, can some one please suggest if anything wrong in this?


Thanks

Mahendra

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: anyDelineatedValue nifi expression is giving ArrayIndexOutOfBoundException

New Contributor

@Mahendra Hegde, I've built the flow as described. It works as expected without any exception.

107557-1554337878645.png


107568-1554337930682.png


I just have formatted the value of condition for RouteOnAttribute.

I've tested on latest build (1.10.0-SNAPSHOT).

Please verify your version. Please let us know version number and share the exception (logs).

View solution in original post

1 REPLY 1
Highlighted

Re: anyDelineatedValue nifi expression is giving ArrayIndexOutOfBoundException

New Contributor

@Mahendra Hegde, I've built the flow as described. It works as expected without any exception.

107557-1554337878645.png


107568-1554337930682.png


I just have formatted the value of condition for RouteOnAttribute.

I've tested on latest build (1.10.0-SNAPSHOT).

Please verify your version. Please let us know version number and share the exception (logs).

View solution in original post

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