rickyma commented on code in PR #1714:
URL:
https://github.com/apache/incubator-uniffle/pull/1714#discussion_r1598336937
##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java:
##########
@@ -914,7 +915,16 @@ public void sendAppHeartbeat(String appId, long timeoutMs)
{
LOG.warn("Failed to send heartbeat to " + shuffleServerInfo);
}
} catch (Exception e) {
- LOG.warn("Error happened when send heartbeat to " +
shuffleServerInfo, e);
+ if (closed) {
+ // this client has been closed, so failing heartbeat calls are
expected
+ LOG.info(
+ "Error happened when send heartbeat to "
+ + shuffleServerInfo
+ + " after shuffle write client has been closed",
+ e);
+ } else {
+ LOG.warn("Error happened when send heartbeat to " +
shuffleServerInfo, e);
Review Comment:
Ditto.
##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java:
##########
@@ -914,7 +915,16 @@ public void sendAppHeartbeat(String appId, long timeoutMs)
{
LOG.warn("Failed to send heartbeat to " + shuffleServerInfo);
}
} catch (Exception e) {
- LOG.warn("Error happened when send heartbeat to " +
shuffleServerInfo, e);
+ if (closed) {
+ // this client has been closed, so failing heartbeat calls are
expected
+ LOG.info(
+ "Error happened when send heartbeat to "
+ + shuffleServerInfo
Review Comment:
Also, `when sending` is better.
##########
server/src/main/java/org/apache/uniffle/server/RegisterHeartBeat.java:
##########
@@ -137,7 +140,9 @@ boolean sendHeartBeat(
sendSuccessfully.set(true);
}
} catch (Exception e) {
- LOG.error(e.getMessage());
+ if (!shutdown) {
+ LOG.error(e.getMessage());
Review Comment:
I think `LOG.error("xxx", e);` is better than `LOG.error(e.getMessage());`.
Because it will give a full stack trace.
##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java:
##########
@@ -914,7 +915,16 @@ public void sendAppHeartbeat(String appId, long timeoutMs)
{
LOG.warn("Failed to send heartbeat to " + shuffleServerInfo);
}
} catch (Exception e) {
- LOG.warn("Error happened when send heartbeat to " +
shuffleServerInfo, e);
+ if (closed) {
+ // this client has been closed, so failing heartbeat calls are
expected
+ LOG.info(
+ "Error happened when send heartbeat to "
+ + shuffleServerInfo
Review Comment:
It's better to use `{}` placeholders.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]