zhedoubushishi commented on pull request #2328:
URL: https://github.com/apache/hudi/pull/2328#issuecomment-749295310


   > I see you have copy pasted most classes from existing ones. Can we try to 
reuse the code as much as possible.
   > 
   > For eg, lets take HoodieDataSourceInternalWriter.
   > We can create a class called HoodieDataSourceInternalWriterHelper and 
pretty much copy contents from HoodieDataSourceInternalWriter.
   > 
   > Within HoodieDataSourceInternalWriter, instantiate 
HoodieDataSourceInternalWriterHelper and call into corresponding methods.
   > Similarly we could do for all classes if required.
   > 
   > HoodieDataSourceInternalWriter(spark2) & 
HoodieDataSourceInternalBatchWriter(spark3)
   > HoodieBulkInsertDataInternalWriterFactory(spark2) & 
HoodieBulkInsertDataInternalWriterFactory(spark3)
   > HoodieBulkInsertDataInternalWriter(spark2) & 
HoodieBulkInsertDataInternalWriter(spark3)
   
   Make sense to me. This can avoid duplicated code. I'll refactor these 
classes.


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


Reply via email to