Skip to content

Instantly share code, notes, and snippets.

@shijinkui
Created July 25, 2015 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shijinkui/7fa0d4529d58b3c2f160 to your computer and use it in GitHub Desktop.
Save shijinkui/7fa0d4529d58b3c2f160 to your computer and use it in GitHub Desktop.
scala promise 中netty channel 连接断开
val promise = Promise[ExecResult]()
// stop spark cluster
SparkUtil.stop(promise)
log.info("=========stopping spark cluster==========" + msg)
val f = promise.future
f onComplete {
case Success(x) =>
log.info("===================2222 " + x)
case Failure(x) =>
log.error("exec stop spark fail, retry, $msg")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment