私はクラスタモードでYARN上でSpark Streamingアプリケーションを実行しています。アプリケーションが終了すると、停止する前に現在のマイクロバッチの実行が終了するように、正常にシャットダウンするようにしています。私はYARNでSpark Streamingアプリケーションを正常に停止するにはどうすればよいですか?
yarn application -kill application_1454432703118_3558
マイクロ持つアプリケーションを強制終了する場合が
sys.ShutdownHookThread {
log.info("Gracefully stopping Spark Streaming Application")
ssc.stop(true, true)
log.info("Application stopped")
}
:私はtrue
にspark.streaming.stopGracefullyOnShutdown
を設定していると私は自分のアプリケーションに次のコードを追加したいくつかのチュートリアル後
その時点で実行されたバッチは完了していません。
Iは、(「優雅停止スパークストリーミングアプリケーション」)印刷ログの最初の行を参照 ドライバではなく、最後の(「アプリケーション停止」)。 執行ログで
ERROR yarn.ApplicationMaster: RECEIVED SIGNAL 15: SIGTERM
INFO streaming.MySparkJob: Gracefully stopping Spark Streaming Application
INFO scheduler.JobGenerator: Stopping JobGenerator gracefully
INFO scheduler.JobGenerator: Waiting for all received blocks to be consumed for job generation
INFO scheduler.JobGenerator: Waited for all received blocks to be consumed for job generation
INFO streaming.StreamingContext: Invoking stop(stopGracefully=true) from shutdown hook
私は次のエラーを参照してください。私は問題は糸がkillシグナルにアプリケーションを送信する方法に関連している
ERROR executor.CoarseGrainedExecutorBackend: Driver 192.168.6.21:49767 disassociated! Shutting down.
INFO storage.DiskBlockManager: Shutdown hook called
WARN remote.ReliableDeliverySupervisor: Association with remote system [akka.tcp://[email protected]:49767] has failed, address is now gated for [5000] ms. Reason: [Disassociated]
INFO util.ShutdownHookManager: Shutdown hook called
と思います。アプリケーションを正常に停止させるにはどうすればいいですか?
これを解決できましたか? –
いいえ、残念ながら。 – nicola