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

[FLINK-4831][metrics] Implement a slf4j metric reporter #4661

Closed
wants to merge 5 commits into from

Conversation

yew1eb
Copy link
Contributor

@yew1eb yew1eb commented Sep 8, 2017

What is the purpose of the change

Implement a slf4j metric reporter For debugging.

Brief change log

Verifying this change

  • Added unit test Slf4jReporterTest
  • Build a local flink cluster used Slf4jReporter, it works well

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (docs)

@zentol
Copy link
Contributor

zentol commented Sep 11, 2017

Really nice that you figured out to rename the package to slf4j :)

I'll check this out in more detail next week.

@yew1eb yew1eb changed the title [FLINK-4831] Implement a slf4j metric reporter [FLINK-4831][metrics] Implement a slf4j metric reporter Sep 20, 2017
@yew1eb
Copy link
Contributor Author

yew1eb commented Sep 25, 2017

@zentol Please let me know if this is good :)

@yew1eb
Copy link
Contributor Author

yew1eb commented Oct 18, 2017

CC @zentol

for (int i = 0; i < strLen; i++) {
final char c = input.charAt(i);
switch (c) {
case ':':
Copy link
Contributor

Choose a reason for hiding this comment

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

why are we filtering this character?

/**
* Test for {@link Slf4jReporter}.
*/

Copy link
Contributor

Choose a reason for hiding this comment

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

remove empty line

<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
Copy link
Contributor

Choose a reason for hiding this comment

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

move to test dependency block and set scope to test


<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
Copy link
Contributor

@zentol zentol Oct 24, 2017

Choose a reason for hiding this comment

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

add <scope>test</scope>

# limitations under the License.
#

log4j.rootLogger=INFO, testlogger
Copy link
Contributor

Choose a reason for hiding this comment

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

This will cause a bit of noise in the logs that I would like to avoid.

Instead, can we, If the log level is configured to OFF, remove all other appenders and set it to INFO? This will make the test run without affecting log files etc.

@yew1eb
Copy link
Contributor Author

yew1eb commented Oct 24, 2017

@zentol thanks a lot for your review. I have updated the PR according to your comments.

@zentol
Copy link
Contributor

zentol commented Oct 25, 2017

merging.

zentol pushed a commit to zentol/flink that referenced this pull request Oct 25, 2017
@asfgit asfgit closed this in c0199f5 Oct 26, 2017
@yew1eb yew1eb deleted the FLINK-4831 branch January 25, 2018 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants