summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2016-03-11 16:47:46 -0800
committerDana Powers <dana.powers@gmail.com>2016-03-11 16:47:46 -0800
commit4ebf28412e70c2e4af10b6fa36fd6d6f3a95e043 (patch)
tree781c2c1cee18743597370b6d5736087a969e5241
parentf1b9b8490a1341def9cabd948357e6c0afd0e9d3 (diff)
downloadkafka-python-coordinator_unknown_heartbeat.tar.gz
Log successful heartbeat as INFO; improve heartbeat response loggingcoordinator_unknown_heartbeat
-rw-r--r--kafka/coordinator/base.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/kafka/coordinator/base.py b/kafka/coordinator/base.py
index a2c47a4..edebe81 100644
--- a/kafka/coordinator/base.py
+++ b/kafka/coordinator/base.py
@@ -536,7 +536,7 @@ class BaseCoordinator(object):
#self.sensors.heartbeat_latency.record(response.requestLatencyMs())
error_type = Errors.for_code(response.error_code)
if error_type is Errors.NoError:
- log.debug("Received successful heartbeat response.")
+ log.info("Heartbeat successful")
future.success(None)
elif error_type in (Errors.GroupCoordinatorNotAvailableError,
Errors.NotCoordinatorForGroupError):
@@ -545,17 +545,18 @@ class BaseCoordinator(object):
self.coordinator_dead()
future.failure(error_type())
elif error_type is Errors.RebalanceInProgressError:
- log.info("Heartbeat failed: group is rebalancing; re-joining group")
+ log.info("Heartbeat: group is rebalancing; this consumer needs to"
+ " re-join")
self.rejoin_needed = True
future.failure(error_type())
elif error_type is Errors.IllegalGenerationError:
- log.info("Heartbeat failed: local generation id is not current;"
- " re-joining group")
+ log.info("Heartbeat: generation id is not current; this consumer"
+ " needs to re-join")
self.rejoin_needed = True
future.failure(error_type())
elif error_type is Errors.UnknownMemberIdError:
- log.info("Heartbeat failed: local member_id was not recognized;"
- " resetting and re-joining group")
+ log.info("Heartbeat: local member_id was not recognized;"
+ " this consumer needs to re-join")
self.member_id = JoinGroupRequest.UNKNOWN_MEMBER_ID
self.rejoin_needed = True
future.failure(error_type)