bowenliang123 commented on code in PR #4144:
URL: https://github.com/apache/kyuubi/pull/4144#discussion_r1082256978


##########
kyuubi-common/src/main/scala/org/apache/kyuubi/Utils.scala:
##########
@@ -147,6 +163,36 @@ object Utils extends Logging {
     dir
   }
 
+  /**
+   * write InputStream to temp file in directory
+   * @param is inputstream for file
+   * @param dir dir path for temp file creation
+   * @param fileName original file name with suffix
+   * @return created new temp file in dir in file name with random path
+   */
+  def writeToTempFile(is: InputStream, dir: Path, fileName: String): File = {

Review Comment:
   Implementation updated with closing input stream after copy.



-- 
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: notifications-unsubscr...@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org
For additional commands, e-mail: notifications-h...@kyuubi.apache.org

Reply via email to