You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2022/03/28 15:07:37 UTC

[GitHub] [zeppelin] jongyoul commented on a change in pull request #4328: [ZEPPELIN-5621] add configuration of tmp_path to store compiled files like scala_shell_tmp-xxx.jar

jongyoul commented on a change in pull request #4328:
URL: https://github.com/apache/zeppelin/pull/4328#discussion_r836538458



##########
File path: flink/flink-scala-parent/src/main/scala/org/apache/zeppelin/flink/internal/FlinkILoop.scala
##########
@@ -101,9 +104,12 @@ class FlinkILoop(
   private val tmpDirBase: File = {
     // get unique temporary folder:
     val abstractID: String = new AbstractID().toString
-    val tmpDir: File = new File(
-      System.getProperty("java.io.tmpdir"),
-      "scala_shell_tmp-" + abstractID)
+    var scalaShellTmpParentFolder = flinkScalaInterpreter.properties.getProperty("zeppelin.flink.scala.shell.tmp_dir")
+    if (StringUtils.isBlank(scalaShellTmpParentFolder)) {
+      scalaShellTmpParentFolder = System.getProperty("java.io.tmpdir")
+    }
+    val tmpDir: File = new File(scalaShellTmpParentFolder, "scala_shell_tmp-" + abstractID)
+    LOGGER.info("Folder for scala shell compiled jar: {}", tmpDir.getAbsolutePath)
     if (!tmpDir.exists) {
       tmpDir.mkdir

Review comment:
       ```suggestion
         tmpDir.mkdirs
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org