You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/06/22 19:59:16 UTC

[GitHub] [hudi] nsivabalan commented on a change in pull request #3075: [HUDI-2009] Fixing extra commit metadata in row writer path

nsivabalan commented on a change in pull request #3075:
URL: https://github.com/apache/hudi/pull/3075#discussion_r656537913



##########
File path: hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/internal/DataSourceInternalWriterHelper.java
##########
@@ -31,15 +31,17 @@
 import org.apache.hudi.exception.HoodieException;
 import org.apache.hudi.table.HoodieSparkTable;
 import org.apache.hudi.table.HoodieTable;
+
+import avro.shaded.com.google.common.annotations.VisibleForTesting;

Review comment:
       guess it gave me illigal imports checkstyle error. I wanted to understand the guidelines in general on how to go about VisibleForTesting things since this annotation is part of illegal imports. 
   
   To test some private methods, how one should approach
   - If we can use VisibleFoTesting annotation, its much simpler. But guess its not allowed. So, I can think of a hacky solution. Create a test class inheriting from the class of interest. make the method of interest protected and expose/overide from tests. this way you can get access to this method of interest. But as you could see, this is not a neat solution. 
   
   




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