/// <exception cref="System.Exception"/> protected internal override void ModifyRMDelegationTokenState() { // imitate dt file is still .new, but old one is deleted Path nodeCreatePath = fsTester.store.GetNodePath(fsTester.store.rmDTSecretManagerRoot , FileSystemRMStateStore.DelegationTokenPrefix + 0); FileSystemRMStateStore fileSystemRMStateStore = (FileSystemRMStateStore)fsTester. GetRMStateStore(); fileSystemRMStateStore.RenameFile(nodeCreatePath, new Path(nodeCreatePath.GetParent (), nodeCreatePath.GetName() + ".new")); }
/// <exception cref="System.Exception"/> protected internal override void ModifyAppState() { // imitate appAttemptFile1 is still .new, but old one is deleted string appAttemptIdStr1 = "appattempt_1352994193343_0001_000001"; ApplicationAttemptId attemptId1 = ConverterUtils.ToApplicationAttemptId(appAttemptIdStr1 ); Path appDir = fsTester.store.GetAppDir(attemptId1.GetApplicationId().ToString()); Path appAttemptFile1 = new Path(appDir, attemptId1.ToString() + ".new"); FileSystemRMStateStore fileSystemRMStateStore = (FileSystemRMStateStore)fsTester. GetRMStateStore(); fileSystemRMStateStore.RenameFile(appAttemptFile1, new Path(appAttemptFile1.GetParent (), appAttemptFile1.GetName() + ".new")); }