[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-06 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15365099#comment-15365099
 ] 

ASF subversion and git services commented on NIFI-2159:
---

Commit 4f2d17a8d4a8a674cd22bf9df68f9d64bff93b92 in nifi's branch 
refs/heads/master from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=4f2d17a ]

NIFI-2159: Fixed bug that caused relationship names not to get added to 
fingerprint

This closes #612

Signed-off-by: jpercivall 


> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Assignee: Mark Payne
>Priority: Blocker
> Fix For: 1.0.0, 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15365102#comment-15365102
 ] 

ASF GitHub Bot commented on NIFI-2159:
--

Github user asfgit closed the pull request at:

https://github.com/apache/nifi/pull/612


> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Assignee: Mark Payne
>Priority: Blocker
> Fix For: 1.0.0, 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-06 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15365052#comment-15365052
 ] 

ASF subversion and git services commented on NIFI-2159:
---

Commit 149c6facc7fb9db9d1680baa4f1c8e7792c58031 in nifi's branch refs/heads/0.x 
from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=149c6fa ]

NIFI-2159: Fixed bug that caused relationship names not to get added to 
fingerprint

This closes #612

Signed-off-by: jpercivall 


> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Assignee: Mark Payne
>Priority: Blocker
> Fix For: 1.0.0, 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15365012#comment-15365012
 ] 

ASF GitHub Bot commented on NIFI-2159:
--

Github user JPercivall commented on the issue:

https://github.com/apache/nifi/pull/612
  
+1 

Reviewed code, did a contrib check build, created a cluster to demonstrated 
the problem and then recreated with the fix and the issue was resolved. Thanks 
Mark will merge it in to 0.x and master


> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Assignee: Mark Payne
>Priority: Blocker
> Fix For: 1.0.0, 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-06 Thread Mark Payne (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364852#comment-15364852
 ] 

Mark Payne commented on NIFI-2159:
--

I implemented the code that you specified here and verified that the unit test 
passes and all looks good. Verified that nodes are able to then reconnect to 
the cluster as appropriate. Created a PR to pull this in. Thanks for catching 
this, [~devriesb]!

> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Priority: Blocker
> Fix For: 1.0.0, 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364849#comment-15364849
 ] 

ASF GitHub Bot commented on NIFI-2159:
--

GitHub user markap14 opened a pull request:

https://github.com/apache/nifi/pull/612

NIFI-2159: Fixed bug that caused relationship names not to get added to 
fingerprint



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/markap14/nifi NIFI-2159

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/612.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #612


commit 6063c7df62d4e9f5216a67d6e981a2fe710c2f19
Author: Mark Payne 
Date:   2016-07-06T18:35:51Z

NIFI-2159: Fixed bug that caused relationship names not to get added to 
fingerprint




> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Priority: Blocker
> Fix For: 1.0.0, 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-05 Thread Mark Payne (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15362878#comment-15362878
 ] 

Mark Payne commented on NIFI-2159:
--

[~devriesb] - agreed, and i am ok with marking this as a blocker. I have 
updated the priority as such.

> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Priority: Blocker
> Fix For: 1.0.0, 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-05 Thread Brandon DeVries (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15362765#comment-15362765
 ] 

Brandon DeVries commented on NIFI-2159:
---

I think it needs to be a blocker.  Basically, as we attempt to actually use 
Apache NiFi in non-trivial production environments, we're seeing a state in 
which NiFi is unaware that anything is wrong, yet nodes in the cluster have 
different flow.xml configurations.  I can't think of anything (possibly 
including data loss) that is a more serious issue (i.e. data is being 
processed, but not in the way the graph would make you think it is being 
processed).  Again, we are not 100% sure that this issue is the one causing the 
bad state... however, it definitely could be, and it is definitely a Very Bad 
Thing™.  I don't think it would be good to put out a release knowing that this 
is an issue, especially given that the solution seems relatively 
straightforward.

> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Priority: Critical
> Fix For: 1.0.0, 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-05 Thread Mark Payne (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15362738#comment-15362738
 ] 

Mark Payne commented on NIFI-2159:
--

[~devriesb] I agree this is a pretty important issue. It looks like it has been 
around for quite a long time, though, and you created this ticket as 'Critical' 
rather than 'Blocker'. Given that we are in Release Candidate state for 0.7.0, 
do you think this should be moved off of 0.7.0? Or do you think this needs to 
be a blocker?

> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Priority: Critical
> Fix For: 1.0.0, 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (NIFI-2159) Fingerprint not detecting flow.xml differences

2016-07-01 Thread Brandon DeVries (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-2159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15359240#comment-15359240
 ] 

Brandon DeVries commented on NIFI-2159:
---

>From the guy who found the issue:

{quote}
In hindsight the list of nodes will still need to be sorted based on text 
contents, as the order of relationships should not matter. My proposed solution 
did not take that into account.
{quote}

So, whoever takes on this ticket will need to check for that as well...


> Fingerprint not detecting flow.xml differences
> --
>
> Key: NIFI-2159
> URL: https://issues.apache.org/jira/browse/NIFI-2159
> Project: Apache NiFi
>  Issue Type: Bug
>Affects Versions: 0.6.1
>Reporter: Brandon DeVries
>Priority: Critical
> Fix For: 0.7.0
>
>
> We have very occasionally observed situations where the flow.xml across a 
> cluster was able to become inconsistent, resulting in unexpected behavior.  
> While investigating, the following issue was found.  While we are not 100% 
> that this problem is the one we were looking for, it is definitely an issue...
> Within the FingerprintFactory, the text values from  tags were 
> always being appended to the fingerprint as a default value of "NO_VALUE" 
> regardless of whether or not they actually contained a value.  This can 
> manifest as two different flow.xml files being considered the same when they 
> have the same number of relationship tags, even though those tags contain 
> different values.  Here is a suggested fix:
> Change the following in FingerprintFactory.java\[1\]:
> {code}
> final List sortedRelationshipElems = sortElements(relationshipElems, 
> getConnectionRelationshipsComparator());
> for (final Element relationshipElem : sortedRelationshipElems) {
> addConnectionRelationshipFingerprint(builder, relationshipElem);
> }
> {code}
> To:
> {code}
> for (int i = 0;ibuilder.append(getValue(relationshipElems.item(i),"NO_VALUE"));
> }
> {code}
> The following unit test will show that the value of the relationship is now 
> being used in the fingerprint:
> {code}
> @Test
> public void testResourceValueInFingerprint() throws IOException{
>final String fp1 = 
> fingerprinter.createFingerprint(getResourceBytes("/nifi/fingerprint/flow1a.xml"),null);
>assertEquals(3,StringUtils.countMatches(fp1,"success"));
> }
> {code}
> Additionally, the  tag isn't being included in the fingerprint either.  
> While the following solution has not been tested, it is possible that this 
> could be fixed by adding the following line to the addConnectionFingerprint() 
> method \[2\]:
> {code}
> appendFirstValue(builder, DomUtils.getChildNodesByTagName(connectionElem, 
> "name"));
> {code}
> \[1\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L861-864
> \[2\] 
> https://github.com/apache/nifi/blob/270944ec692e12c221cdff202bdab56309dfcfd7/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/fingerprint/FingerprintFactory.java#L857



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)