[GitHub] [hadoop] goiri commented on a change in pull request #1573: HDFS-14889. Add ability to identify a Provided storage block.

2019-10-02 Thread GitBox
goiri commented on a change in pull request #1573: HDFS-14889. Add ability to 
identify a Provided storage block.
URL: https://github.com/apache/hadoop/pull/1573#discussion_r330671348
 
 

 ##
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoStriped.java
 ##
 @@ -244,6 +244,11 @@ final boolean hasNoStorage() {
 return true;
   }
 
+  @Override
+  boolean isProvided() {
+return false;
 
 Review comment:
   Add a comment saying why it's never provided.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[GitHub] [hadoop] goiri commented on a change in pull request #1573: HDFS-14889. Add ability to identify a Provided storage block.

2019-10-02 Thread GitBox
goiri commented on a change in pull request #1573: HDFS-14889. Add ability to 
identify a Provided storage block.
URL: https://github.com/apache/hadoop/pull/1573#discussion_r330670481
 
 

 ##
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoContiguous.java
 ##
 @@ -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()) {
 
 Review comment:
   Shouldn't this already guarantee is false?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[GitHub] [hadoop] goiri commented on a change in pull request #1573: HDFS-14889. Add ability to identify a Provided storage block.

2019-10-02 Thread GitBox
goiri commented on a change in pull request #1573: HDFS-14889. Add ability to 
identify a Provided storage block.
URL: https://github.com/apache/hadoop/pull/1573#discussion_r330670733
 
 

 ##
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoContiguous.java
 ##
 @@ -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()) {
 
 Review comment:
   I see is the other method which goes over each DN, nevermind.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[GitHub] [hadoop] goiri commented on a change in pull request #1573: HDFS-14889. Add ability to identify a Provided storage block.

2019-10-02 Thread GitBox
goiri commented on a change in pull request #1573: HDFS-14889. Add ability to 
identify a Provided storage block.
URL: https://github.com/apache/hadoop/pull/1573#discussion_r330670220
 
 

 ##
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoContiguous.java
 ##
 @@ -28,12 +29,16 @@
 @InterfaceAudience.Private
 public class BlockInfoContiguous extends BlockInfo {
 
+  private boolean hasProvidedStorage;
+
   public BlockInfoContiguous(short size) {
 super(size);
+hasProvidedStorage = false;
 
 Review comment:
   Can we just set by default as false and not do it here?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[GitHub] [hadoop] goiri commented on a change in pull request #1573: HDFS-14889. Add ability to identify a Provided storage block.

2019-10-02 Thread GitBox
goiri commented on a change in pull request #1573: HDFS-14889. Add ability to 
identify a Provided storage block.
URL: https://github.com/apache/hadoop/pull/1573#discussion_r330670779
 
 

 ##
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoContiguous.java
 ##
 @@ -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()) {
+  hasProvidedStorage = false;
+}
 return true;
   }
 
+  @Override
+  boolean isProvided() {
+return hasProvidedStorage;
+  }
+
+  private boolean hasProvidedStorages() {
 
 Review comment:
   High level javadoc.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[GitHub] [hadoop] goiri commented on a change in pull request #1573: HDFS-14889. Add ability to identify a Provided storage block.

2019-10-02 Thread GitBox
goiri commented on a change in pull request #1573: HDFS-14889. Add ability to 
identify a Provided storage block.
URL: https://github.com/apache/hadoop/pull/1573#discussion_r330671566
 
 

 ##
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockInfoContiguous.java
 ##
 @@ -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()) {
 
 Review comment:
   Can you go over the overhead added to the regular pipeline without Provided?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org