adoroszlai commented on code in PR #8028:
URL: https://github.com/apache/ozone/pull/8028#discussion_r1985990736


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestDataUtil.java:
##########
@@ -104,6 +105,14 @@ public static OzoneVolume createVolume(OzoneClient client,
 
   }
 
+  public static byte[] createKey(OzoneBucket bucket,
+                                 String keyName, int length) throws 
IOException {
+    byte[] content = RandomStringUtils.random(length, 0, 0,
+        true, true, null, new SecureRandom()).getBytes(UTF_8);

Review Comment:
   - Let's clarify that this method generates string content by renaming to 
`createStringKey`.
   - Please avoid `new SecureRandom()` or `new Random()` for single use.  
Replace with 
`RandomStringUtils.secure().nextAlphanumeric(length).getBytes(UTF_8)`.
   - nit: Please do not format method signature like this. Whenever visibility 
/ return type / method name / other modifiers are changed, we would have to 
reindent all parameters.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to