-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admin - Implement perform leader election
Add support for leader election process Split the response parsing since the returned errors are in a matrix (topic and partition)
- Loading branch information
Showing
4 changed files
with
179 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from __future__ import absolute_import | ||
|
||
# enum in stdlib as of py3.4 | ||
try: | ||
from enum import IntEnum # pylint: disable=import-error | ||
except ImportError: | ||
# vendored backport module | ||
from kafka.vendor.enum34 import IntEnum | ||
|
||
class ElectionType(IntEnum): | ||
""" Leader election type | ||
""" | ||
|
||
PREFERRED = 0, | ||
UNCLEAN = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters