hadoop-yarn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sujeet Varakhedi <svarakh...@gopivotal.com>
Subject AMRMTokens with Unmanaged Application Master
Date Mon, 27 Jan 2014 18:49:02 GMT
Hi All,
I am not sure if this is the right alias to ask this question. Let me know
if there is any other for these type of questions.
I am trying to create an Unmanaged ApplicationMaster and having issues with
creating AMRMtokens right. I peeked into the TestAMRMtokens.java test cases
and here is what I have come up with. (This is scala code)


*def getNextAttemptid() : ApplicationAttemptId = {*
*    val t = java.lang.System.currentTimeMillis()*
*
ConverterUtils.toApplicationAttemptId(ConverterUtils.APPLICATION_ATTEMPT_PREFIX
+ "_" + t.toString() + "_0001" + "_0001")*
*  }*

*  appAttemptId = getNextAttemptid()*


*   UserGroupInformation.setConfiguration(yarnConf)*
*   val ugi = UserGroupInformation.getCurrentUser()*
*    val tokenIdentifier = new AMRMTokenIdentifier(appAttemptId)*
*    val secretManager = new AMRMTokenSecretManager(yarnConf)*
*    val token: Token[_ <: TokenIdentifier] = new
Token[AMRMTokenIdentifier](tokenIdentifier, secretManager)*
*    ugi.addToken(token)*

*    amClient = AMRMClient.createAMRMClient()*
*    amClient.init(yarnConf)*
*    amClient.start()*
*    val appMasterResponse =
amClient.registerApplicationMaster("localhost", 0, "")  *




Yarn does not like this request and says:
2014-01-27 10:47:10,938 WARN SecurityLogger.org.apache.hadoop.ipc.Server:
Auth failed for 127.0.0.1:63085:null (DIGEST-MD5: IO error acquiring
password)
2014-01-27 10:47:10,938 INFO org.apache.hadoop.ipc.Server: IPC Server
listener on 8030: readAndProcess from client 127.0.0.1 threw exception
[org.apache.hadoop.security.token.SecretManager$InvalidToken: Password not
found for ApplicationAttempt appattempt_1390848430314_0001_000001]


I am sure I am doing something wrong. Is a documentation or example code
that tells how to create the tokens right?

Thanks in advance

Sujeet

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message