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

[fix] fix get job metrics get NPE #8093

Merged
merged 6 commits into from
Nov 29, 2024
Merged

[fix] fix get job metrics get NPE #8093

merged 6 commits into from
Nov 29, 2024

Conversation

liunaijie
Copy link
Member

Purpose of this pull request

part fix of #8081

Does this PR introduce any user-facing change?

no

How was this patch tested?

exist tests

Check list

@github-actions github-actions bot added the Zeta label Nov 21, 2024
@liunaijie
Copy link
Member Author

part of fix, to avoid get NullPointException. We still need find why the running job can't be find in the IMAP

@@ -39,4 +39,4 @@ seatunnel:
metric:
enabled: false
logs:
scheduled-deletion-enable: true
scheduled-deletion-enable: false
Copy link
Member

Choose a reason for hiding this comment

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

why change this?

Copy link
Member Author

Choose a reason for hiding this comment

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

If this set to true, it will start the log deletion thread to delete log files, first it will lookup the log folder.

But in CI, log4j is using console print, won't write log to file. https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-e2e-common/src/test/resources/log4j2.properties#L25

So when this config enabled, it will get exception
image

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This problem does exist. Is there any better way to avoid this problem

Copy link
Member Author

@liunaijie liunaijie Nov 28, 2024

Choose a reason for hiding this comment

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

Can we disable it in CI? as we won't write log file during CI and there has no test using this config.

Copy link
Member

Choose a reason for hiding this comment

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

Ok for me. The delete expired log file test case config is

.

coordinatorServiceTest
.getFlakeIdGenerator(Constant.SEATUNNEL_ID_GENERATOR_NAME)
.newId();
Long jobId = System.currentTimeMillis();
Copy link
Member

Choose a reason for hiding this comment

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

why?

Copy link
Member Author

Choose a reason for hiding this comment

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

will revert this

@@ -39,4 +39,4 @@ seatunnel:
metric:
enabled: false
logs:
scheduled-deletion-enable: true
scheduled-deletion-enable: false
Copy link
Member

Choose a reason for hiding this comment

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

Ok for me. The delete expired log file test case config is

.

@hailin0 hailin0 merged commit 18b2496 into apache:dev Nov 29, 2024
7 checks passed
@liunaijie liunaijie deleted the fix/fix_npe branch December 27, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants