You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/04/13 14:35:06 UTC

[GitHub] [ozone] jojochuang commented on a diff in pull request #3242: HDDS-6455. Adding a Builder class to Freon ContentGenerator, so as to avoid Constructor Telescoping.

jojochuang commented on code in PR #3242:
URL: https://github.com/apache/ozone/pull/3242#discussion_r849558555


##########
hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/freon/TestContentGenerator.java:
##########
@@ -57,7 +61,9 @@ public void writeWithByteLevelWrite() throws IOException {
 
   @Test
   public void writeWithSmallBuffer() throws IOException {
-    ContentGenerator generator = new ContentGenerator(1024, 1024, 10);
+    ContentGenerator generator =
+        new ContentGenerator.Builder().seyKeySize(1024).setBufferSize(1024)
+            .setCopyBufferSize(10).build();

Review Comment:
   typically builder classes are initialized one setter at a line. For example
   
   ```suggestion
           new ContentGenerator.Builder()
               .seyKeySize(1024)
               .setBufferSize(1024)
               .setCopyBufferSize(10)
               .build()
   ```



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org