Skip to content
Snippets Groups Projects
Commit 57566d0a authored by zsxwing's avatar zsxwing Committed by Sean Owen
Browse files

[SPARK-6059][Yarn] Add volatile to ApplicationMaster's reporterThread and allocator

`ApplicationMaster.reporterThread` and `ApplicationMaster.allocator` are accessed in multiple threads, so they should be marked as `volatile`.

Author: zsxwing <zsxwing@gmail.com>

Closes #4814 from zsxwing/SPARK-6059 and squashes the following commits:

17d9386 [zsxwing] Add volatile to ApplicationMaster's reporterThread and allocator
parent e747e984
No related branches found
No related tags found
No related merge requests found
......@@ -68,8 +68,8 @@ private[spark] class ApplicationMaster(
@volatile private var finalMsg: String = ""
@volatile private var userClassThread: Thread = _
private var reporterThread: Thread = _
private var allocator: YarnAllocator = _
@volatile private var reporterThread: Thread = _
@volatile private var allocator: YarnAllocator = _
// Fields used in client mode.
private var actorSystem: ActorSystem = null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment