diff --git a/piflow-server/src/main/scala/cn/piflow/api/API.scala b/piflow-server/src/main/scala/cn/piflow/api/API.scala index c60a7e6..f034fc2 100644 --- a/piflow-server/src/main/scala/cn/piflow/api/API.scala +++ b/piflow-server/src/main/scala/cn/piflow/api/API.scala @@ -118,7 +118,7 @@ object API { } def stopFlow(process : SparkAppHandle): String = { - process.stop() + process.kill() "ok" } diff --git a/piflow-server/src/main/scala/cn/piflow/api/HTTPService.scala b/piflow-server/src/main/scala/cn/piflow/api/HTTPService.scala index 034c252..dfeda6b 100644 --- a/piflow-server/src/main/scala/cn/piflow/api/HTTPService.scala +++ b/piflow-server/src/main/scala/cn/piflow/api/HTTPService.scala @@ -80,6 +80,7 @@ object HTTPService extends DefaultJsonProtocol with Directives with SprayJsonSup processMap.get(appId) match { case Some(process) => val result = API.stopFlow(process) + processMap.-(appId) Future.successful(HttpResponse(entity = result)) case ex =>{ println(ex)