Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Log statements to log Topic for Java Functions #1447

Merged
merged 8 commits into from
Mar 27, 2018

Conversation

srkukarni
Copy link
Contributor

Motivation

Currently logTopic directive only works for Python functions. This pr brings that functionality to Java Functions as well.

Modifications

Describe the modifications you've done.

Result

After your change, what will change.

@srkukarni
Copy link
Contributor Author

@sijie @merlimat

@srkukarni
Copy link
Contributor Author

retest this please

@@ -262,10 +268,12 @@ public void run() {
}
long processAt = System.currentTimeMillis();
stats.incrementProcessed(processAt);
addLogTopicHandler();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be done at per message?

Can we configure the log handler at the beginning of the instance and remove it at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to send only the log messages inside the function to the log topic. Other logging messages inside the java instance or runtime should not be sent. Thats why we need to do this on a per message basis.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay... I am not sure if there is any performance penalty here. but okay to me for now.

@sijie sijie merged commit 86b9546 into apache:master Mar 27, 2018
@srkukarni srkukarni deleted the java_logtopic branch March 27, 2018 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants