Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
7d3ccfe
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
c9e88a2
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
9fd9d99
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
20f4470
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
4d16aa7
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
71588eb
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
58741b5
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
6017207
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
29400e5
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
164f1c0
Merge pull request #2 from Daniilchik/HDDS-3498-1
Daniilchik Oct 2, 2024
83fbbbe
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 2, 2024
4a46f4d
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 3, 2024
4b4a582
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 3, 2024
6253cb1
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 3, 2024
d9536ab
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 3, 2024
3bb033d
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 4, 2024
0ac758e
HDDS-3498. Shutdown datanode if address is already in use
Daniilchik Oct 4, 2024
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 @@ -234,12 +234,14 @@ public void logIfNeeded(Exception ex) {
}

if (missCounter == 0) {
LOG.warn(
"Unable to communicate to {} server at {} for past {} seconds.",
serverName,
getAddress().getHostString() + ":" + getAddress().getPort(),
TimeUnit.MILLISECONDS.toSeconds(this.getMissedCount() *
getScmHeartbeatInterval(this.conf)), ex);
LOG.error(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why you changed it to error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the remark. I’ll change it back. I initially changed it at the beginning of working on the task.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

"Unable to communicate to {} server at {}:{} for past {} seconds.",
serverName,
address.getAddress(),
address.getPort(),
TimeUnit.MILLISECONDS.toSeconds(this.getMissedCount() * getScmHeartbeatInterval(this.conf)),
Copy link
Contributor

@ivanzlenko ivanzlenko Oct 2, 2024

Choose a reason for hiding this comment

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

I would rather calculate it beforehand in a dedicated variable just to improve code readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

ex
);
}

if (LOG.isTraceEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public EndpointStateMachine.EndPointStates call() throws Exception {
} catch (DiskOutOfSpaceException ex) {
rpcEndPoint.setState(EndpointStateMachine.EndPointStates.SHUTDOWN);
} catch (IOException ex) {
rpcEndPoint.logIfNeeded(ex);
LOG.error(ex.getCause().getMessage(), ex);
Copy link
Contributor

Choose a reason for hiding this comment

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

LOG.error(ex) should already print message from exception. I would rather put here thoughtful and distinct message so it will be much easier to pinpoint place of the failure and understand when and why it failed.

rpcEndPoint.setState(EndpointStateMachine.EndPointStates.SHUTDOWN);
} finally {
rpcEndPoint.unlock();
}
Expand Down