{"action":"created","issue":{"url":"https://api.github.com/repos/apache/nifi/issues/1332","repository_url":"https://api.github.com/repos/apache/nifi","labels_url":"https://api.github.com/repos/apache/nifi/issues/1332/labels{/name}","comments_url":"https://api.github.com/repos/apache/nifi/issues/1332/comments","events_url":"https://api.github.com/repos/apache/nifi/issues/1332/events","html_url":"https://github.com/apache/nifi/pull/1332","id":195757487,"number":1332,"title":"Nifi 3163","user":{"login":"ijokarumawak","id":1107620,"avatar_url":"https://avatars.githubusercontent.com/u/1107620?v=3","gravatar_id":"","url":"https://api.github.com/users/ijokarumawak","html_url":"https://github.com/ijokarumawak","followers_url":"https://api.github.com/users/ijokarumawak/followers","following_url":"https://api.github.com/users/ijokarumawak/following{/other_user}","gists_url":"https://api.github.com/users/ijokarumawak/gists{/gist_id}","starred_url":"https://api.github.com/users/ijokarumawak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijokarumawak/subscriptions","organizations_url":"https://api.github.com/users/ijokarumawak/orgs","repos_url":"https://api.github.com/users/ijokarumawak/repos","events_url":"https://api.github.com/users/ijokarumawak/events{/privacy}","received_events_url":"https://api.github.com/users/ijokarumawak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-15T09:36:31Z","updated_at":"2016-12-15T10:29:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/nifi/pulls/1332","html_url":"https://github.com/apache/nifi/pull/1332","diff_url":"https://github.com/apache/nifi/pull/1332.diff","patch_url":"https://github.com/apache/nifi/pull/1332.patch"},"body":"Thank you for submitting a contribution to Apache NiFi.\r\n\r\nIn order to streamline the review of the contribution we ask you\r\nto ensure the following steps have been taken:\r\n\r\n### For all changes:\r\n- [x] Is there a JIRA ticket associated with this PR? Is it referenced \r\n     in the commit message?\r\n\r\n- [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen \"-\" character.\r\n\r\n- [x] Has your PR been rebased against the latest commit within the target branch (typically master)?\r\n\r\n- [ ] Is your initial contribution a single, squashed commit? No. This PR contains two commits for specific review purpose.\r\n\r\n### For code changes:\r\n- [x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?\r\n- [x] Have you written or updated unit tests to verify your changes?\r\n\r\n### Note:\r\nPlease ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/nifi/issues/comments/267294065","html_url":"https://github.com/apache/nifi/pull/1332#issuecomment-267294065","issue_url":"https://api.github.com/repos/apache/nifi/issues/1332","id":267294065,"user":{"login":"ijokarumawak","id":1107620,"avatar_url":"https://avatars.githubusercontent.com/u/1107620?v=3","gravatar_id":"","url":"https://api.github.com/users/ijokarumawak","html_url":"https://github.com/ijokarumawak","followers_url":"https://api.github.com/users/ijokarumawak/followers","following_url":"https://api.github.com/users/ijokarumawak/following{/other_user}","gists_url":"https://api.github.com/users/ijokarumawak/gists{/gist_id}","starred_url":"https://api.github.com/users/ijokarumawak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijokarumawak/subscriptions","organizations_url":"https://api.github.com/users/ijokarumawak/orgs","repos_url":"https://api.github.com/users/ijokarumawak/repos","events_url":"https://api.github.com/users/ijokarumawak/events{/privacy}","received_events_url":"https://api.github.com/users/ijokarumawak/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T10:29:20Z","updated_at":"2016-12-15T10:29:20Z","body":"This PR contains two commits for easier review process (I hope).\r\n\r\n## 1st commit: Added RPG settings to fingerprint\r\n\r\nThe first commit adds RemoteProcessGroup's (RPG) timeout, yieldPeriod, transportProtocol, proxyHost, proxyPort,  proxyUser and proxyPassword to flow fingerprint.\r\nThis commit changes NiFi cluster behavior in a scenario below:\r\n- For example, there are 3 nodes (node1, 2 and 3) in a cluster, and a RPG is used in a flow\r\n- Node2 gets disconnected, after these steps:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1107620/21219576/ad277c7e-c2f8-11e6-8c7e-6c6de2914030.png)\r\n\r\n- Case1: The cluster (node1 and node3) remove node2 from the cluster, and update the RPG setting, such as Transport Protocol. Then node2 is **restarted**.\r\n- Case2: Node2 starts running as a standalone mode since it is disconnected from the cluster. It's able to modify the flow from node2 UI. Update the RPG setting such as Transport Protocol. Then node2 is **reconnected** by the cluster.\r\n\r\nWith above case 1 and 2, the results will be different with this fix.\r\n\r\n- Case1:\r\n  - Before fix: Node2 can join the cluster because flow of Node2 and the one in the cluster are determined as equal by fingerprint. Node2 will update its flow with the one in the cluster. This is problematic when a cluster is entirely restarted. An old flow can be elected and possibly overwrites the latest flow. \r\n  - After fix: Node2 CANNOT join the cluster since it has different flow than the cluster. This ensures each node has the latest flow.\r\n\r\n- Case2:\r\n  - Before fix: Node2 can join the cluster. It keeps working with the old flow! E.g. the latest flow uses HTTP as transport protocol on Node 1 and 3 while Node2 uses RAW protocol.\r\n  - After fix: Node2 CANNOT join the cluster. This ensures each node has the latest flow when it gets reconnected.\r\n\r\nFor both cases, expected recover operation would be: DataFlowManager removes the flow.xml.gz on Node2 then restart it to join the cluster.\r\n\r\nTested above scenarios before and after applying this fix. Confirmed it works as written above.\r\n\r\n## 2nd commit: Removed unused private methods from FingerprintFactory\r\n\r\nFingerprintFactory has two types of fingerprinting method, from XML\r\nelements and from DTO. However, the ones from DTO are not used by\r\nanywhere. IDE didn't report those private methods unused because\r\naddProcessGroupFingerprint and addSnippetFingerprint call each other,\r\nbut those are not used from outside actually.\r\n\r\nThis commit removes those private methods to keep the class clean to\r\navoid unnecessary code maintenance and tests."}}
{"actor":{"display_login":"ijokarumawak"}}