Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,8 @@ public void run() {

private SupervisorWorkerHeartbeats getAndResetWorkerHeartbeats() {
Map<String, LSWorkerHeartbeat> localHeartbeats;
try {
localHeartbeats = SupervisorUtils.readWorkerHeartbeats(this.conf);
return getSupervisorWorkerHeartbeatsFromLocal(localHeartbeats);
} catch (Exception e) {
LOG.error("Read local worker heartbeats error, skipping heartbeats for this round, msg:{}", e.getMessage());
return null;
}
localHeartbeats = SupervisorUtils.readWorkerHeartbeats(this.conf);
return getSupervisorWorkerHeartbeatsFromLocal(localHeartbeats);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method is called in from run method https://github.com/apache/storm/blob/master/storm-server/src/main/java/org/apache/storm/daemon/supervisor/timer/ReportWorkerHeartbeats.java#L45-L49
This try catch loop ensures that thread does not die.
Not sure what this PR is trying to accomplish. Please elaborate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the request in ticket https://issues.apache.org/jira/browse/STORM-3188, is the try catch necessary?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is. Maybe we should close the issue as won't fix.

}

private SupervisorWorkerHeartbeats getSupervisorWorkerHeartbeatsFromLocal(Map<String, LSWorkerHeartbeat> localHeartbeats) {
Expand Down