Skip to content

[Spark Load] Redirect the spark launcher's log to a separated log file - #4470

Merged
morningman merged 5 commits into
apache:masterfrom
xy720:spark-load-log
Aug 30, 2020
Merged

[Spark Load] Redirect the spark launcher's log to a separated log file#4470
morningman merged 5 commits into
apache:masterfrom
xy720:spark-load-log

Conversation

@xy720

Copy link
Copy Markdown
Member

Proposed changes

#4469

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

outReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
while (!isStop && (line = outReader.readLine()) != null) {
LOG.info("monitor log: " + line);
outputBuffer.append(line + '\n');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not just output to the outputStream? So that we don't need to buffer a log of content in memory?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

ok. I changed it

}

public void clearSparkLauncherLog() {
String logPath = sparkLoadAppHandle.getLogPath();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are you sure the sparkLoadAppHandle is not null here?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Not sure. So I made a new check here.

@morningmanmorningman self-assigned this Aug 27, 2020
@morningmanmorningman added area/spark-load Issues or PRs related to the spark load kind/improvement labels Aug 27, 2020

@morningmanmorningman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@morningmanmorningman added the approved Indicates a PR has been approved by one committer. label Aug 29, 2020
@morningman
morningman merged commit 7b67da3 into apache:masterAug 30, 2020
@yangzhgyangzhg mentioned this pull request Feb 9, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.area/spark-loadIssues or PRs related to the spark loadkind/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@xy720@morningman