You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2022/06/27 02:34:46 UTC

[incubator-linkis] branch dev-1.2.0 updated: HDFSCacheLogWriter getOutPutStream NPE (#2339)

This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch dev-1.2.0
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.2.0 by this push:
     new 595bf90dd HDFSCacheLogWriter getOutPutStream NPE (#2339)
595bf90dd is described below

commit 595bf90dde2a365dd08a734321e8167797c60c0f
Author: Dlimeng <me...@gmail.com>
AuthorDate: Mon Jun 27 10:34:43 2022 +0800

    HDFSCacheLogWriter getOutPutStream NPE (#2339)
---
 .../main/scala/org/apache/linkis/entrance/log/HDFSCacheLogWriter.scala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/log/HDFSCacheLogWriter.scala b/linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/log/HDFSCacheLogWriter.scala
index 6b959028a..60cbf9da6 100644
--- a/linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/log/HDFSCacheLogWriter.scala
+++ b/linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/log/HDFSCacheLogWriter.scala
@@ -63,8 +63,9 @@ class HDFSCacheLogWriter(logPath: String,
   def getOutputStream: OutputStream = {
     if (null == outputStream) OUT_LOCKER.synchronized {
       if (null == outputStream) {
+        if(fileSystem != null) outputStream = fileSystem.write(new FsPath(logPath), false)
+        else logger.warn("fileSystem is null")
 
-        outputStream = fileSystem.write(new FsPath(logPath), false)
       }
     }
     outputStream


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org