Skip to content

HDFS-17561. Make HeartbeatManager.Monitor use up-to-date heartbeatRecheckInterval#8541

Open
kokonguyen191 wants to merge 3 commits into
apache:trunkfrom
kokonguyen191:HDFS-17561
Open

HDFS-17561. Make HeartbeatManager.Monitor use up-to-date heartbeatRecheckInterval#8541
kokonguyen191 wants to merge 3 commits into
apache:trunkfrom
kokonguyen191:HDFS-17561

Conversation

@kokonguyen191

Copy link
Copy Markdown
Contributor

Description of PR

(rebased and reopened due to being auto close some time back)

DatanodeManager can changes heartbeatRecheckInterval via reconf API but HeartbeatManager's copy of heartbeatRecheckInterval is fixed at initialization and won't update when DatanodeManager updates with a new config.

@ZanderXu ZanderXu left a comment

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.

Make sense. Leave some comments.

private volatile long heartbeatIntervalSeconds;
private volatile int heartbeatRecheckInterval;
/** Used by {@link HeartbeatManager}. */
private volatile long heartbeatRecheckIntervalForMonitor;

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.

How about moving it to HeartbeatManager?

}

@VisibleForTesting
public void refreshHeartbeatRecheckIntervalForMonitor() {

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.

Move this method to HeartbeatManager and just change it if heartbeatRecheckInterval is changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants