jia-gao commented on code in PR #1627:
URL: https://github.com/apache/samza/pull/1627#discussion_r969877891


##########
samza-log4j2/src/main/java/org/apache/samza/logging/log4j2/StreamAppender.java:
##########
@@ -73,7 +73,7 @@ public class StreamAppender extends AbstractAppender {
   private final BlockingQueue<EncodedLogEvent> logQueue = new 
LinkedBlockingQueue<>(DEFAULT_QUEUE_SIZE);
 
   private SystemStream systemStream = null;
-  private SystemProducer systemProducer = null;
+  protected SystemProducer systemProducer = null;

Review Comment:
   good question. This is mainly for testing purposes. oss samza has 
MockSystemProducer to test StreamAppender 
https://github.com/apache/samza/blob/ea14805a0588ac3cd7ffbef0e23463962bf9246b/samza-log4j2/src/test/java/org/apache/samza/logging/log4j2/MockSystemProducer.java
   
   However, LI samza's InLogsAppender inherits StreamAppender and it doesn't 
have a way to inject this dependency and mock its behavior.
   In the long run, it could be beneficial to use composition instead of 
inheritance. It means a refactor of current LI samza code



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

Reply via email to