simbadzina commented on code in PR #5145:
URL: https://github.com/apache/hadoop/pull/5145#discussion_r1028419083


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/impl/StateStoreFileBaseImpl.java:
##########
@@ -88,6 +88,15 @@ protected abstract <T extends BaseRecord> BufferedReader 
getReader(
   protected abstract <T extends BaseRecord> BufferedWriter getWriter(
       String path);
 
+  /**
+   * Convenience method to allow to mocking of protected
+   * {@link #getWriter(String)}
+   */
+  @VisibleForTesting
+  public BufferedWriter getBufferedWriter(String path) {

Review Comment:
   The annotation is to state that the member is only public for tests. So 
non-test use-cases outside of the class should throw an error.
   
https://github.com/apache/hadoop/blob/8f971b0e5413b491a2c7043bd25b046777e07395/hadoop-common-project/hadoop-annotations/src/main/java/org/apache/hadoop/classification/VisibleForTesting.java#L27-L38



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

To unsubscribe, e-mail: [email protected]

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