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

[Feature][Zeta][Core] Support api get logs #7818

Merged
merged 19 commits into from
Oct 21, 2024

Conversation

zhangshenghang
Copy link
Member

Purpose of this pull request

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@liugddx
Copy link
Member

liugddx commented Oct 11, 2024

Please add test cases in RestApiIT

@hailin0
Copy link
Member

hailin0 commented Oct 11, 2024

suggestion

Browse this node log files through browser

  • list log files name
GET /logs
----------------

seatunnel-engine-server.log
job-xxx1.log
job-xxx2.log
...
  • click filename to output log content text
GET /logs/job-xxx1.log
----------------

[INFO] ....
[INFO] ....
[INFO] ....
.....

Browse job all logs through browser

  • request master get job log of all host node
GET /logs/xxx1
----------------

node1-job-xxx1.log
node2-job-xxx1.log
node3-job-xxx1.log
....
  • request master get job log of node1
GET /logs/xxx1/node1-job-xxx1.log
----------------

[INFO] ....
[INFO] ....
[INFO] ....
.....

Example: Browse files through browser

image

@hailin0
Copy link
Member

hailin0 commented Oct 11, 2024

link #7712, #7787

@github-actions github-actions bot added the api label Oct 15, 2024
@liugddx
Copy link
Member

liugddx commented Oct 15, 2024

According to #7647, we need to implement the V2 version of the api

@zhangshenghang
Copy link
Member Author

effect
iShot

@liugddx
Copy link
Member

liugddx commented Oct 15, 2024

@zhangshenghang
Copy link
Member Author

https://github.com/apache/seatunnel/blob/dev/docs/en/seatunnel-engine/rest-api-v2.md Please maintain documentation here.

ok, thank you for your reminder

@hailin0
Copy link
Member

hailin0 commented Oct 15, 2024

good pr

@liugddx
Copy link
Member

liugddx commented Oct 17, 2024

Please resolve code conflicts

@davidzollo
Copy link
Contributor

good job

@Hisoka-X
Copy link
Member

Please update https://github.com/apache/seatunnel/blob/934434cc75afc747339182df6468f89a5d0fb1b2/docs/en/seatunnel-engine/logging.md to tell user we can get logs by rest api.


Returns a list of logs from the requested node.

#### Examples
Copy link
Member

Choose a reason for hiding this comment

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

Can I use http://localhost:5801/log/12345 to get job 12345's logs in current node?

Copy link
Member Author

@zhangshenghang zhangshenghang Oct 20, 2024

Choose a reason for hiding this comment

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

Can I use http://localhost:5801/log/12345 to get job 12345's logs in current node?

Currently not supported, /log can only be matched accurately

Copy link
Member

@liugddx liugddx left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @zhangshenghang

@Hisoka-X Hisoka-X merged commit f640eda into apache:dev Oct 21, 2024
8 checks passed
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.

5 participants