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

[Bug] [Entrance]HDFSCacheLogWriter getOutPutStream NPE #2040

Closed
2 tasks done
peacewong opened this issue Apr 26, 2022 · 2 comments
Closed
2 tasks done

[Bug] [Entrance]HDFSCacheLogWriter getOutPutStream NPE #2040

peacewong opened this issue Apr 26, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@peacewong
Copy link
Contributor

Search before asking

  • I searched the issues and found no similar issues.

Linkis Component

linkis-cg-entrance

What happened + What you expected to happen

There is an NPE problem in HDFSCacheLogWriter getOutputStream, and it does not judge whether the fileSystem is Null
HDFSCacheLogWriter getOutputStream存在NPE问题,没有判断fileSystem是否为Null

def getOutputStream: OutputStream = {
    if (null == outputStream) OUT_LOCKER.synchronized {
      if (null == outputStream) {

        outputStream = fileSystem.write(new FsPath(logPath), false)
      }
    }
    outputStream
  }

You should make a short judgment when writeToFile is called, and give a Warn-level log
Uploading image.png…

Relevent platform

all

Reproduction script

no

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@peacewong peacewong added the bug Something isn't working label Apr 26, 2022
@dlimeng
Copy link
Contributor

dlimeng commented Jun 23, 2022

I want to fix this issue. Please assign to me.

@peacewong
Copy link
Contributor Author

I want to fix this issue. Please assign to me.

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants