You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/09/28 09:03:00 UTC
[jira] [Commented] (NIFI-5645) Auto reconnect
ConsumeWindowsEventLog if no log is consumed for configured time period
[ https://issues.apache.org/jira/browse/NIFI-5645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16631574#comment-16631574 ]
ASF GitHub Bot commented on NIFI-5645:
--------------------------------------
GitHub user ijokarumawak opened a pull request:
https://github.com/apache/nifi/pull/3037
NIFI-5645: Auto reconnect ConsumeWindowsEventLog
Following screenshots illustrate before and after for this fix:
The left one is the patched one, right one is the released one ver 1.7.1.

Both can receive logs normally.

Now, restart Windows Event Log service.

Restarting services generated 2 more logs. Both processors were able to get these. However, from this point, no further logs can be consumed. Need to restart processors manually to recover. That is the issue this patch trying to address.

The updated processor automatically reconnect after seeing no new logs for the configured time period.

Then, logs written after reconnection can be delivered successfully. See the current version misses that.

---
This commit also contains following refactoring:
- Catch URISyntaxException inside subscribe when constructing provenance
URI as it does not affect the core responsibility of this processor.
Even if it fails to be a proper URI, if the query works for consuming
logs, the processor should proceed forward.
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [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.
- [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
- [x] Is your initial contribution a single, squashed commit?
### For code changes:
- [x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
### Note:
Please 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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ijokarumawak/nifi nifi-5645
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/3037.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 #3037
----
commit 3f12ddb7e28d46798887304f6c72f276e95693b6
Author: Koji Kawamura <ij...@...>
Date: 2018-09-28T08:37:34Z
NIFI-5645: Auto reconnect ConsumeWindowsEventLog
This commit also contains following refactoring:
- Catch URISyntaxException inside subscribe when constructing provenance
URI as it does not affect the core responsibility of this processor.
Even if it fails to be a proper URI, if the query works for consuming
logs, the processor should proceed forward.
----
> Auto reconnect ConsumeWindowsEventLog if no log is consumed for configured time period
> --------------------------------------------------------------------------------------
>
> Key: NIFI-5645
> URL: https://issues.apache.org/jira/browse/NIFI-5645
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: 1.0.0
> Reporter: Koji Kawamura
> Assignee: Koji Kawamura
> Priority: Major
>
> While ConsumeWindowsEventLog is running, if Windows Event Log service is restarted, or ERROR_EVT_QUERY_RESULT_STALE (15011) is returned, the processor keeps running, but will not receive further log events.
> Current work-around is restarting the processor manually.
> We could implement auto-reconnect logic like below, so that the processor can recover from such situation automatically.
> * Add a new processor property, ''Inactive duration to reconnect", e.g. "3 mins"
> * At onTrigger, check how long has it passed since the last message was received. If it exceeds the configured duration, reset the consumer
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)