swagle commented on a change in pull request #1950:
URL: https://github.com/apache/ozone/pull/1950#discussion_r582097542



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/ChecksumByteBufferImpl.java
##########
@@ -54,6 +79,23 @@
     }
   };
 
+  public static ChecksumByteBuffer crc32Impl() {
+    return new ChecksumByteBufferImpl(new CRC32());
+  }
+
+  public static ChecksumByteBuffer crc32Cimpl() {
+    if (useJava9Crc32C) {
+      try {
+        return new ChecksumByteBufferImpl(Java9Crc32CFactory.createChecksum());

Review comment:
       What I meant was to separate out the Factory class from the interface 
impl to encapsulate the object creation logic separate from the behavior that 
the impl provides, this suggestion was based on the fact that crc32Cimpl is 
like a static factory method but it is co-located with the impl. 




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



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

Reply via email to