From e3908091b884eb53377b57e28c9185a022bf9d6d Mon Sep 17 00:00:00 2001 From: Bowen Liang Date: Fri, 24 Nov 2023 13:10:15 +0800 Subject: [PATCH] fix processBuilder --- .../main/scala/org/apache/kyuubi/engine/ProcBuilder.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala index dad7b1721ab..690bb988964 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ProcBuilder.scala @@ -21,19 +21,18 @@ import java.io.{File, FileFilter, IOException} import java.net.URI import java.nio.charset.StandardCharsets import java.nio.file.{Files, Path, Paths} - import scala.collection.JavaConverters._ - import com.google.common.annotations.VisibleForTesting import com.google.common.collect.EvictingQueue import org.apache.commons.lang3.StringUtils.containsIgnoreCase - import org.apache.kyuubi._ import org.apache.kyuubi.config.KyuubiConf import org.apache.kyuubi.config.KyuubiConf.KYUUBI_HOME import org.apache.kyuubi.operation.log.OperationLog import org.apache.kyuubi.util.NamedThreadFactory +import scala.collection.mutable.ArrayBuffer + trait ProcBuilder { import ProcBuilder._ @@ -142,7 +141,7 @@ trait ProcBuilder { } final lazy val processBuilder: ProcessBuilder = { - val pb = new ProcessBuilder(commands: _*) + val pb = new ProcessBuilder(commands.toStream.asJava) val envs = pb.environment() envs.putAll(env.asJava)