Skip to content

HDFS-14889. Ability to check if a block has a replica on provided storage. #1573

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

Closed
wants to merge 4 commits into from

Conversation

ashvina
Copy link
Contributor

@ashvina ashvina commented Oct 2, 2019

Addresses https://issues.apache.org/jira/browse/HDFS-14889.
Adding a method in BlockInfo to return true of the block has any replica on a Provided storage.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 39 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 mvninstall 1081 trunk passed
+1 compile 65 trunk passed
+1 checkstyle 46 trunk passed
+1 mvnsite 72 trunk passed
+1 shadedclient 835 branch has no errors when building and testing our client artifacts.
+1 javadoc 84 trunk passed
0 spotbugs 169 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 166 trunk passed
_ Patch Compile Tests _
+1 mvninstall 63 the patch passed
+1 compile 62 the patch passed
+1 javac 62 the patch passed
+1 checkstyle 39 the patch passed
+1 mvnsite 63 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 778 patch has no errors when building and testing our client artifacts.
+1 javadoc 82 the patch passed
+1 findbugs 173 the patch passed
_ Other Tests _
-1 unit 5596 hadoop-hdfs in the patch failed.
+1 asflicense 41 The patch does not generate ASF License warnings.
9372
Reason Tests
Failed junit tests hadoop.hdfs.server.blockmanagement.TestUnderReplicatedBlocks
hadoop.hdfs.tools.TestDFSZKFailoverController
hadoop.hdfs.server.namenode.snapshot.TestRenameWithSnapshots
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/1/artifact/out/Dockerfile
GITHUB PR #1573
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 04f898c3378b 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 41440ec
Default Java 1.8.0_222
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/1/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/1/testReport/
Max. process+thread count 4004 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/1/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

public BlockInfoContiguous(short size) {
super(size);
hasProvidedStorage = false;
Copy link
Member

Choose a reason for hiding this comment

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

Can we just set by default as false and not do it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed it for now.

@@ -77,9 +85,31 @@ boolean removeStorage(DatanodeStorageInfo storage) {
setStorageInfo(dnIndex, getStorageInfo(lastNode));
// set the last entry to null
setStorageInfo(lastNode, null);
if (storage.getStorageType() == StorageType.PROVIDED
&& !hasProvidedStorages()) {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this already guarantee is false?

Copy link
Member

Choose a reason for hiding this comment

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

I see is the other method which goes over each DN, nevermind.

Copy link
Member

Choose a reason for hiding this comment

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

Can you go over the overhead added to the regular pipeline without Provided?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the check and there is no invocation in the regular pipeline now.

return hasProvidedStorage;
}

private boolean hasProvidedStorages() {
Copy link
Member

Choose a reason for hiding this comment

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

High level javadoc.

@ashvina ashvina changed the title HDFS-14889. Add ability to identify a Provided storage block. HDFS-14889. Ability to check if a block has a replica on provided storage. Oct 2, 2019
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 50 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 mvninstall 1415 trunk passed
+1 compile 72 trunk passed
+1 checkstyle 53 trunk passed
+1 mvnsite 81 trunk passed
+1 shadedclient 985 branch has no errors when building and testing our client artifacts.
+1 javadoc 82 trunk passed
0 spotbugs 205 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 202 trunk passed
_ Patch Compile Tests _
+1 mvninstall 73 the patch passed
+1 compile 64 the patch passed
+1 javac 64 the patch passed
+1 checkstyle 43 the patch passed
+1 mvnsite 71 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
-1 shadedclient 272 patch has errors when building and testing our client artifacts.
+1 javadoc 90 the patch passed
-1 findbugs 26 hadoop-hdfs in the patch failed.
_ Other Tests _
-1 unit 25 hadoop-hdfs in the patch failed.
0 asflicense 14 ASF License check generated no output?
3669
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/2/artifact/out/Dockerfile
GITHUB PR #1573
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux ff81f9dd94c3 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 685918e
Default Java 1.8.0_222
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/2/artifact/out/patch-findbugs-hadoop-hdfs-project_hadoop-hdfs.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/2/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/2/testReport/
Max. process+thread count 411 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/2/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@Override
boolean isProvided() {
int len = getCapacity();
for(int idx = 0; idx < len; idx++) {
Copy link
Member

Choose a reason for hiding this comment

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

space after the for

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

int len = getCapacity();
for(int idx = 0; idx < len; idx++) {
DatanodeStorageInfo cur = getStorageInfo(idx);
if(cur != null) {
Copy link
Member

Choose a reason for hiding this comment

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

Space after the if

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 41 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 mvninstall 1083 trunk passed
+1 compile 68 trunk passed
+1 checkstyle 49 trunk passed
+1 mvnsite 74 trunk passed
+1 shadedclient 925 branch has no errors when building and testing our client artifacts.
+1 javadoc 92 trunk passed
0 spotbugs 168 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 166 trunk passed
_ Patch Compile Tests _
+1 mvninstall 64 the patch passed
+1 compile 61 the patch passed
+1 javac 61 the patch passed
+1 checkstyle 40 the patch passed
+1 mvnsite 64 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 807 patch has no errors when building and testing our client artifacts.
+1 javadoc 79 the patch passed
+1 findbugs 169 the patch passed
_ Other Tests _
-1 unit 5347 hadoop-hdfs in the patch failed.
+1 asflicense 43 The patch does not generate ASF License warnings.
9239
Reason Tests
Failed junit tests hadoop.hdfs.server.namenode.TestRedudantBlocks
hadoop.hdfs.tools.TestDFSZKFailoverController
hadoop.hdfs.server.namenode.ha.TestStandbyCheckpoints
hadoop.hdfs.server.namenode.snapshot.TestRenameWithSnapshots
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/3/artifact/out/Dockerfile
GITHUB PR #1573
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 3924a8d6fc07 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 4c24f24
Default Java 1.8.0_222
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/3/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/3/testReport/
Max. process+thread count 4100 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/3/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 426 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 mvninstall 1215 trunk passed
+1 compile 63 trunk passed
+1 checkstyle 45 trunk passed
+1 mvnsite 70 trunk passed
+1 shadedclient 912 branch has no errors when building and testing our client artifacts.
+1 javadoc 79 trunk passed
0 spotbugs 175 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 173 trunk passed
_ Patch Compile Tests _
+1 mvninstall 66 the patch passed
+1 compile 57 the patch passed
+1 javac 57 the patch passed
+1 checkstyle 40 the patch passed
+1 mvnsite 65 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 840 patch has no errors when building and testing our client artifacts.
+1 javadoc 76 the patch passed
+1 findbugs 176 the patch passed
_ Other Tests _
-1 unit 5951 hadoop-hdfs in the patch failed.
+1 asflicense 35 The patch does not generate ASF License warnings.
10364
Reason Tests
Failed junit tests hadoop.hdfs.server.namenode.TestNameNodeMXBean
hadoop.hdfs.server.namenode.snapshot.TestRenameWithSnapshots
hadoop.hdfs.TestRollingUpgrade
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/4/artifact/out/Dockerfile
GITHUB PR #1573
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux dedb0fa0bade 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / a3fe404
Default Java 1.8.0_222
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/4/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/4/testReport/
Max. process+thread count 3070 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/4/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 365 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 mvninstall 1456 trunk passed
+1 compile 77 trunk passed
+1 checkstyle 57 trunk passed
+1 mvnsite 85 trunk passed
+1 shadedclient 1007 branch has no errors when building and testing our client artifacts.
+1 javadoc 95 trunk passed
0 spotbugs 213 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 210 trunk passed
_ Patch Compile Tests _
+1 mvninstall 78 the patch passed
+1 compile 68 the patch passed
+1 javac 67 the patch passed
+1 checkstyle 47 the patch passed
+1 mvnsite 65 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 782 patch has no errors when building and testing our client artifacts.
+1 javadoc 82 the patch passed
+1 findbugs 195 the patch passed
_ Other Tests _
-1 unit 5219 hadoop-hdfs in the patch failed.
+1 asflicense 42 The patch does not generate ASF License warnings.
10008
Reason Tests
Failed junit tests hadoop.hdfs.server.namenode.TestRedudantBlocks
hadoop.hdfs.server.namenode.ha.TestPendingCorruptDnMessages
hadoop.hdfs.server.namenode.snapshot.TestRenameWithSnapshots
hadoop.hdfs.TestReconstructStripedFile
hadoop.hdfs.server.blockmanagement.TestUnderReplicatedBlocks
hadoop.hdfs.TestDFSInotifyEventInputStreamKerberized
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/5/artifact/out/Dockerfile
GITHUB PR #1573
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux b3f859c79d77 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / a3fe404
Default Java 1.8.0_222
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/5/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/5/testReport/
Max. process+thread count 4824 (vs. ulimit of 5500)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1573/5/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

asfgit pushed a commit that referenced this pull request Oct 4, 2019
@virajith
Copy link
Contributor

virajith commented Oct 4, 2019

Thanks for posting this @ashvina and the review @goiri . Merged this into trunk.

@virajith virajith closed this Oct 4, 2019
@virajith virajith reopened this Oct 4, 2019
@virajith virajith closed this Oct 4, 2019
amahussein pushed a commit to amahussein/hadoop that referenced this pull request Oct 29, 2019
RogPodge pushed a commit to RogPodge/hadoop that referenced this pull request Mar 25, 2020
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.

4 participants