sv2000 commented on a change in pull request #2728: [GOBBLIN-874] Make 
WorkUnitPacker and SizeEstimator pluggable
URL: https://github.com/apache/incubator-gobblin/pull/2728#discussion_r322343871
 
 

 ##########
 File path: 
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/workunit/packer/KafkaWorkUnitPacker.java
 ##########
 @@ -58,20 +59,34 @@
 
   private static final Logger LOG = 
LoggerFactory.getLogger(KafkaWorkUnitPacker.class);
 
+  /**
+   * For customized type of the following enums, it will try to find declared 
class in classpath
+   * and fallback to exception if ClassNotFound. This way the sizeEstimator 
and packer could be easier to
+   * extend. The major purpose for keeping this enum instead of using 
reflection only to construct the instance
+   * of packer or sizeEstimator is to maintain backward-compatibility.
+   *
+   * The constructor of customized type needs to be annotated with public 
access-modifier as it is instantiated by
+   * {@link GobblinConstructorUtils} which reside in different package, and it 
needs to have the same signature
+   * as other implementation under the enum.
+   */
   public enum PackerType {
     SINGLE_LEVEL,
-    BI_LEVEL
+    BI_LEVEL,
+    CUSTOMIZED
 
 Review comment:
   CUSTOM instead of CUSTOMIZED?

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


With regards,
Apache Git Services

Reply via email to