fix stop flow bug

This commit is contained in:
judy0131 2018-10-19 15:52:19 +08:00
parent d8d0768eb6
commit 93812c5783
2 changed files with 2 additions and 1 deletions

View File

@ -118,7 +118,7 @@ object API {
}
def stopFlow(process : SparkAppHandle): String = {
process.stop()
process.kill()
"ok"
}

View File

@ -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)