jerrypeng commented on a change in pull request #1845: Functions schema 
integration
URL: https://github.com/apache/incubator-pulsar/pull/1845#discussion_r194920693
 
 

 ##########
 File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstance.java
 ##########
 @@ -38,22 +41,24 @@
  */
 @Slf4j
 public class JavaInstance implements AutoCloseable {
+    private final Logger instanceLog;
+    private ContextImpl context;
 
     @Getter(AccessLevel.PACKAGE)
-    private final ContextImpl context;
     private Function function;
     private java.util.function.Function javaUtilFunction;
+    private Optional<PulsarSource> optionalPulsarSource = Optional.empty();
 
     public JavaInstance(InstanceConfig config, Object userClassObject,
                  ClassLoader clsLoader,
                  PulsarClient pulsarClient,
                  Source source) {
         // TODO: cache logger instances by functions?
-        Logger instanceLog = LoggerFactory.getLogger("function-" + 
config.getFunctionDetails().getName());
+        this.instanceLog = LoggerFactory.getLogger("function-" + 
config.getFunctionDetails().getName());
 
 Review comment:
   I don't think we need a instanceLog to be a member variable.  I think it is 
only referenced in the constructor

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to