Skip to content

Conversation

@Likkey
Copy link
Contributor

@Likkey Likkey commented Jul 27, 2022

Description of PR

Add Precondition.checkArgument() for minimumRedundantVolumes to ensure that the value is greater than the number of  NameNode storage volumes to avoid never being able to turn off safe mode afterwards.

JIRA:HDFS-16697

How was this patch tested?

It is found that “dfs.namenode.resource.checked.volumes.minimum” lacks a condition check and an associated exception handling mechanism, which makes it impossible to find the root cause of the impact when a misconfiguration occurs.
This patch provides a check of the configuration items,it will throw a IllegalArgumentException and detailed error message when the value of "dfs.namenode.resource.checked.volumes.minimum" is set greater than the number of NameNode storage volumes to avoid the misconfiguration from affecting the subsequent operation of the program.

Randomly setting “dfs.namenode.resource.checked.volumes.minimum” will always prevent safe mode from being turned off
@Likkey Likkey closed this Jul 28, 2022
@Likkey Likkey reopened this Jul 28, 2022
@Likkey Likkey closed this Jul 28, 2022
@Likkey Likkey deleted the branch-3.1.3 branch July 28, 2022 05:29
@Likkey Likkey restored the branch-3.1.3 branch July 28, 2022 05:40
@Likkey Likkey reopened this Jul 28, 2022
@Likkey Likkey closed this Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant