bharatviswa504 commented on a change in pull request #1167: HDDS-1863. Freon 
RandomKeyGenerator even if keySize is set to 0, it returns some random data to 
key.
URL: https://github.com/apache/hadoop/pull/1167#discussion_r309329802
 
 

 ##########
 File path: 
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java
 ##########
 @@ -263,9 +262,7 @@ public Void call() throws Exception {
     // Compute the common initial digest for all keys without their UUID
     if (validateWrites) {
       commonInitialMD = DigestUtils.getDigest(DIGEST_ALGORITHM);
-      int uuidLength = UUID.randomUUID().toString().length();
-      keySize = Math.max(uuidLength, keySize);
-      for (long nrRemaining = keySize - uuidLength; nrRemaining > 0;
+      for (long nrRemaining = keySize; nrRemaining > 0;
 
 Review comment:
   Yes, we don't enter inside for loop if keySize passed is negative.
   
   If we want to add keySize checks, i think it might be applicable for all the 
parameters like numVolumes, numBuckets. I will open a new jira to handle this.
   
   So, if any parameter is incorrect, show the error message to the user or any 
other idea how to handle this?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to