pratyakshsharma commented on a change in pull request #1433:
URL: https://github.com/apache/incubator-hudi/pull/1433#discussion_r414444476



##########
File path: hudi-spark/src/main/java/org/apache/hudi/keygen/KeyGenerator.java
##########
@@ -40,4 +40,22 @@ protected KeyGenerator(TypedProperties config) {
    * Generate a Hoodie Key out of provided generic record.
    */
   public abstract HoodieKey getKey(GenericRecord record);
+
+  public abstract String getPartitionPath(GenericRecord record, String 
partitionPathField);

Review comment:
       Yeah this thing was in my mind at the time of writing this piece of 
code. So there is a tradeoff here. If you do not want to expose these methods 
in abstract class, then I cannot initialise keyGenerator in a generic way in 
getPartitionPath() and getRecordKey() functions in CustomKeyGenerator class 
like I am doing right now and there will be a bit of redundant code in this 
class then. Hence I preferred to have it the way it is right now. 
   
   Anyways let me refactor as you are saying, then we can discuss further. 




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


Reply via email to