Skip to content

Commit

Permalink
Pass container ApplicationAttemptId to security handling (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdambrauskas authored and erwa committed Jun 26, 2019
1 parent f7190ea commit 010acf2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ public class ApplicationMaster {
/**
* Metadata + History Server related variables
*/
private ApplicationAttemptId appAttemptID = null;
private String appIdString;
private FileSystem resourceFs; // FileSystem used to access resources for the job, like jars and zips
private FileSystem historyFs; // FileSystem used to write history-related files like config and events.
Expand Down Expand Up @@ -414,6 +413,7 @@ private boolean prepare() throws IOException {

if (secureMode) {
// Set up secret manager for RPC servers
ApplicationAttemptId appAttemptID = containerId.getApplicationAttemptId();
ClientToAMTokenIdentifier identifier = new ClientToAMTokenIdentifier(appAttemptID, user);
byte[] secret = response.getClientToAMTokenMasterKey().array();
ClientToAMTokenSecretManager secretManager = new ClientToAMTokenSecretManager(appAttemptID, secret);
Expand Down

0 comments on commit 010acf2

Please sign in to comment.