-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-15855.Solve the problem of incorrect EC progress when loading FsImage. #2741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as far as I know there aren't supposed to be too many EC policies to load. But it's a nice-to-have nevertheless.
According to Jenkins the only test that failed was TestBalancer, which is unrelated to this patch. |
@jojochuang , thanks for your comment. |
@@ -482,11 +483,15 @@ private void loadPolicy(ErasureCodingPolicyInfo info) { | |||
* | |||
*/ | |||
public synchronized void loadPolicies( | |||
List<ErasureCodingPolicyInfo> ecPolicies, Configuration conf) | |||
List<ErasureCodingPolicyInfo> ecPolicies, Configuration conf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you leave the old header passing a null so we don't need to modify the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, keep the original method and parameters as followinng.
public synchronized void loadPolicies( List<ErasureCodingPolicyInfo> ecPolicies, Configuration conf) { loadPolicies(ecPolicies, conf, null); }
@@ -143,7 +143,7 @@ public void testChangeDefaultPolicy() throws Exception { | |||
testPolicy); | |||
manager.init(conf); | |||
// Load policies similar to when fsimage is loaded at namenode startup | |||
manager.loadPolicies(constructAllDisabledInitialPolicies(), conf); | |||
manager.loadPolicies(constructAllDisabledInitialPolicies(), conf, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test with the counter being passed?
@goiri , thanks for your comment. I will add some unit tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It almost looks good to me, will give +1 from my side when add new unit test to cover the ecpolicy counter. Thanks @jianghuazhu for your works.
@@ -482,11 +483,15 @@ private void loadPolicy(ErasureCodingPolicyInfo info) { | |||
* | |||
*/ | |||
public synchronized void loadPolicies( | |||
List<ErasureCodingPolicyInfo> ecPolicies, Configuration conf) | |||
List<ErasureCodingPolicyInfo> ecPolicies, Configuration conf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, keep the original method and parameters as followinng.
public synchronized void loadPolicies( List<ErasureCodingPolicyInfo> ecPolicies, Configuration conf) { loadPolicies(ecPolicies, conf, null); }
@Hexiaoqiao , @jojochuang , I have submitted a new solution. |
💔 -1 overall
This message was automatically generated. |
…Image.
NOTICE
Please create an issue in ASF JIRA before opening a pull request,
and you need to set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. HADOOP-XXXXX. Fix a typo in YYY.)
For more details, please see https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute