-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-15940. Fixing and refactoring tests specific to Block recovery #2844
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
Conversation
💔 -1 overall
This message was automatically generated. |
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.
LGTM... mostly just checkstyle fixes. +1 on breaking up the test and naming it properly. Why all the failures?
Thanks for the review @saintstack . The failures are flakies or some recent permanent ones. I have seen almost similar no of failures on many of recent PRs. Trying to spend some time when I can to fix them. |
There is a new build running. Lets see what set it produces. |
💔 -1 overall
This message was automatically generated. |
This is the usual no of failed tests that we have seen recently. Except for a couple of tests, majority of them seem to be failing quite often. I have seen them on other PRs too. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
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.
Thanx @virajjasani for volunteering the fix. Extremely sorry for coming up this late, occupied with some internal work.
In general everything looks good. Some minor nits. Please give a check, will conclude this post them. :-)
public class TestBlockRecovery { | ||
public class TestBlockRecovery1 { |
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.
Lets not bother the name, Let it be as is.
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.
Sure, sounds good. Will update.
ReplicaRecoveryInfo replica1 = new ReplicaRecoveryInfo(BLOCK_ID, | ||
REPLICA_LEN1, GEN_STAMP-1, ReplicaState.FINALIZED); | ||
ReplicaRecoveryInfo replica2 = new ReplicaRecoveryInfo(BLOCK_ID, | ||
REPLICA_LEN1, GEN_STAMP-2, ReplicaState.FINALIZED); | ||
ReplicaRecoveryInfo replica1 = new ReplicaRecoveryInfo(BLOCK_ID, | ||
REPLICA_LEN1, GEN_STAMP - 1, ReplicaState.FINALIZED); | ||
ReplicaRecoveryInfo replica2 = new ReplicaRecoveryInfo(BLOCK_ID, | ||
REPLICA_LEN1, GEN_STAMP - 2, ReplicaState.FINALIZED); |
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 chunk out the formatting changes in this file? We can restrict ourselves to only the intended changes, Usually we aren't mixing checkstyle fixes with the other code changes..
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.
Indeed I also did not want to mix checkstyle with actual test fix, however only after QA bot showed eol space and eol blank warnings, I updated this (in last 2 commits). Are you fine with it?
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.
May be because you changed the file name and it read it as a new file?
one or two fixes are ok, but in case the PR doesn't induce the checkstyle and there are plenty. we can let it stay as is, and let the one approving spend some time, checking that. :-)
Anyway lets ignore for now. I expect the build won't have anything which would require you any more commits
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.
Oh you are right, maybe QA bot had EOL issues which were not relevant to actual changes because I renamed the file earlier.
Anyway lets ignore for now. I expect the build won't have anything which would require you any more commits
Sure sounds good, I will take care of this going forward. It's the rename which might let QA bot scan entire file regardless of how minor the actual change is in that file.
...ect/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery2.java
Outdated
Show resolved
Hide resolved
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.
Thanks for the review @ayushtkn , could you please take a look again?
Thanks
public class TestBlockRecovery { | ||
public class TestBlockRecovery1 { |
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.
Sure, sounds good. Will update.
ReplicaRecoveryInfo replica1 = new ReplicaRecoveryInfo(BLOCK_ID, | ||
REPLICA_LEN1, GEN_STAMP-1, ReplicaState.FINALIZED); | ||
ReplicaRecoveryInfo replica2 = new ReplicaRecoveryInfo(BLOCK_ID, | ||
REPLICA_LEN1, GEN_STAMP-2, ReplicaState.FINALIZED); | ||
ReplicaRecoveryInfo replica1 = new ReplicaRecoveryInfo(BLOCK_ID, | ||
REPLICA_LEN1, GEN_STAMP - 1, ReplicaState.FINALIZED); | ||
ReplicaRecoveryInfo replica2 = new ReplicaRecoveryInfo(BLOCK_ID, | ||
REPLICA_LEN1, GEN_STAMP - 2, ReplicaState.FINALIZED); |
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.
Indeed I also did not want to mix checkstyle with actual test fix, however only after QA bot showed eol space and eol blank warnings, I updated this (in last 2 commits). Are you fine with it?
...ect/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery2.java
Outdated
Show resolved
Hide resolved
259eccf
to
db1524b
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
There are checkstyle warnings from the new file, |
…Contributed by Viraj Jasani
0079954
to
71e9cf9
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
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.
Only a test change and the touched tests passes:
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2844/13/testReport/org.apache.hadoop.hdfs.server.datanode/TestBlockRecovery2/
Will merge by EOD, if no objections
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.
LGTM. Thanks for working on this.
…2844). Contributed by Viraj Jasani Signed-off-by: Ayush Saxena <ayushsaxena@apache.org> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
Thanx @virajjasani for the contribution and @tasanuma for the review!!! |
…pache#2844). Contributed by Viraj Jasani Signed-off-by: Ayush Saxena <ayushsaxena@apache.org> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org> (cherry picked from commit 2b5fd34) Conflicts: hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery.java
…2902) * HDFS-15940. Fixing and refactoring tests specific to Block recovery.(#2844). Contributed by Viraj Jasani (cherry picked from commit 2b5fd34) Conflicts: hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockRecovery.java * HDFS-15940. Fix TestBlockRecovery2#testRaceBetweenReplicaRecoveryAndFinalizeBlock (ADDENDUM) (#2874) (cherry picked from commit 56bd968) (cherry picked from commit 4994b73) Co-authored-by: Viraj Jasani <vjasani@apache.org>
…pache#2844). Contributed by Viraj Jasani Signed-off-by: Ayush Saxena <ayushsaxena@apache.org> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
No description provided.