[KYUUBI #412] [MINOR] Simplify ProcBuilder code
 [](https://github.com/yaooqinn/kyuubi/pull/412)      [❨?❩](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info)<!-- PR-BADGE: PLEASE DO NOT REMOVE THIS COMMENT --> remove redundancy code, beause scala SAM will opt the code. ### _Why are the changes needed?_ just simpfy code ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request Closes #412 from MyLanPangzi/master. 2830118 [hiscat] Update ProcBuilder.scala a368183 [hiscat] refacotor(kyuubi-main): fix code analysis error f3f1bca [hiscat] refactor(kyuubi-main): fix compile error fb1b841 [hiscat] reafactor(kyuubi-main): simpfy ProcBuilder code Lead-authored-by: MyLanPangzi <1251723871@qq.com> Co-authored-by: hiscat <46845236+MyLanPangzi@users.noreply.github.com> Signed-off-by: Kent Yao <yao@apache.org>
This commit is contained in:
parent
471dbbcb61
commit
4d3f0742dd
@ -105,8 +105,8 @@ trait ProcBuilder {
|
||||
val proc = processBuilder.start()
|
||||
val reader = Files.newBufferedReader(engineLog.toPath, StandardCharsets.UTF_8)
|
||||
|
||||
val redirect = new Runnable {
|
||||
override def run(): Unit = try {
|
||||
val redirect: Runnable = { () =>
|
||||
try {
|
||||
val maxErrorSize = conf.get(KyuubiConf.ENGINE_ERROR_MAX_SIZE)
|
||||
var line: String = reader.readLine
|
||||
while (true) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user