You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@crail.apache.org by GitBox <gi...@apache.org> on 2021/02/10 20:10:25 UTC

[GitHub] [incubator-crail] patrickstuedi commented on a change in pull request #85: Resource Elasticity [2/3]

patrickstuedi commented on a change in pull request #85:
URL: https://github.com/apache/incubator-crail/pull/85#discussion_r574040022



##########
File path: namenode/src/main/java/org/apache/crail/namenode/BlockStore.java
##########
@@ -171,9 +192,33 @@ short addDataNode(DataNodeBlocks dataNode) {
 		return RpcErrors.ERR_OK;
 
 	}
-	
+
+	short prepareForRemovalDatanode(DataNodeInfo dn) throws Exception {
+		// this will only mark it for removal
+		return _prepareOrRemoveDN(dn, true);
+	}
+
+	short removeDatanode(DataNodeInfo dn) throws Exception {
+		// this will remove it as well
+		return _prepareOrRemoveDN(dn, false);
+	}
+
 	//---------------
-	
+
+	private short _prepareOrRemoveDN(DataNodeInfo dn, boolean onlyMark) throws Exception {

Review comment:
       I'm not a big fan of using "_" for private methods, maybe just rename the methods of this type




----------------------------------------------------------------
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:
users@infra.apache.org