GitHub user shikhar reopened a pull request:
https://github.com/apache/kafka/pull/1745
KAFKA-4042: prevent DistributedHerder thread from dying from connector/task
lifecycle exceptions
- `worker.startConnector()` and `worker.startTask()` can throw (e.g.
`ClassNotFoundException`, `ConnectException`, or any other exception arising
from the constructor of the connector or task class when we `newInstance()`),
so add catch blocks around those calls from the `DistributedHerder` and handle
by invoking `onFailure()` which updates the `StatusBackingStore`.
- `worker.stopConnector()` throws `ConnectException` if start failed
causing the connector to not be registered with the worker, so guard with
`worker.ownsConnector()`
- `worker.stopTasks()` and `worker.awaitStopTasks()` throw
`ConnectException` if any of them failed to start and are hence not registered
with the worker, so guard those calls by filtering the task IDs with
`worker.ownsTask()`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/shikhar/kafka distherder-stayup
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1745.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 #1745
----
commit 4bb02e610b01d7b425f5c39b435d4d7484b89ee9
Author: Shikhar Bhushan <[email protected]>
Date: 2016-08-17T23:29:30Z
KAFKA-4042: prevent `DistributedHerder` thread from dying from
connector/task lifecycle exceptions
- `worker.startConnector()` and `worker.startTask()` can throw (e.g.
`ClassNotFoundException`, `ConnectException`), so add catch blocks around those
calls from the `DistributedHerder` and handle by invoking `onFailure()` which
updates the `StatusBackingStore`.
- `worker.stopConnector()` throws `ConnectException` if start failed
causing the connector to not be registered with the worker, so guard with
`worker.ownsConnector()`
- `worker.stopTasks()` and `worker.awaitStopTasks()` throw
`ConnectException` if any of them failed to start and are hence not registered
with the worker, so guard those calls by filtering the task IDs with
`worker.ownsTask()`
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---