@@ -536,26 +536,27 @@ def _handle_heartbeat_response(self, future, response):
536
536
#self.sensors.heartbeat_latency.record(response.requestLatencyMs())
537
537
error_type = Errors .for_code (response .error_code )
538
538
if error_type is Errors .NoError :
539
- log .debug ( "Received successful heartbeat response. " )
539
+ log .info ( "Heartbeat successful" )
540
540
future .success (None )
541
541
elif error_type in (Errors .GroupCoordinatorNotAvailableError ,
542
542
Errors .NotCoordinatorForGroupError ):
543
- log .info ("Heartbeat failed: coordinator is either not started or"
544
- " not valid; will refresh metadata and retry" )
543
+ log .warning ("Heartbeat failed: coordinator is either not started or"
544
+ " not valid; will refresh metadata and retry" )
545
545
self .coordinator_dead ()
546
546
future .failure (error_type ())
547
547
elif error_type is Errors .RebalanceInProgressError :
548
- log .info ("Heartbeat failed: group is rebalancing; re-joining group" )
548
+ log .warning ("Heartbeat: group is rebalancing; this consumer needs to"
549
+ " re-join" )
549
550
self .rejoin_needed = True
550
551
future .failure (error_type ())
551
552
elif error_type is Errors .IllegalGenerationError :
552
- log .info ("Heartbeat failed: local generation id is not current;"
553
- " re-joining group " )
553
+ log .warning ("Heartbeat: generation id is not current; this consumer "
554
+ " needs to re-join " )
554
555
self .rejoin_needed = True
555
556
future .failure (error_type ())
556
557
elif error_type is Errors .UnknownMemberIdError :
557
- log .info ("Heartbeat failed : local member_id was not recognized;"
558
- " resetting and re-joining group " )
558
+ log .warning ("Heartbeat: local member_id was not recognized;"
559
+ " this consumer needs to re-join " )
559
560
self .member_id = JoinGroupRequest .UNKNOWN_MEMBER_ID
560
561
self .rejoin_needed = True
561
562
future .failure (error_type )
@@ -597,8 +598,8 @@ def __call__(self):
597
598
self ._coordinator .need_rejoin ()):
598
599
# no need to send the heartbeat we're not using auto-assignment
599
600
# or if we are awaiting a rebalance
600
- log .debug ("Skipping heartbeat: no auto-assignment"
601
- " or waiting on rebalance" )
601
+ log .info ("Skipping heartbeat: no auto-assignment"
602
+ " or waiting on rebalance" )
602
603
return
603
604
604
605
if self ._coordinator .coordinator_unknown ():
@@ -633,7 +634,7 @@ def _handle_heartbeat_success(self, v):
633
634
self ._client .schedule (self , time .time () + ttl )
634
635
635
636
def _handle_heartbeat_failure (self , e ):
636
- log .debug ("Heartbeat failed; retrying" )
637
+ log .warning ("Heartbeat failed; retrying" )
637
638
self ._request_in_flight = False
638
639
etd = time .time () + self ._coordinator .config ['retry_backoff_ms' ] / 1000.0
639
640
self ._client .schedule (self , etd )
0 commit comments