public virtual void Setup() { conf = CreateConfiguration(); rpc = YarnRPC.Create(conf); rmAddress = conf.GetSocketAddr(YarnConfiguration.RmAddress, YarnConfiguration.DefaultRmAddress , YarnConfiguration.DefaultRmPort); AccessControlList adminACL = new AccessControlList(string.Empty); conf.Set(YarnConfiguration.YarnAdminAcl, adminACL.GetAclString()); resourceManager = new _MockRM_85(conf); new _Thread_96(this).Start(); int waitCount = 0; while (resourceManager.GetServiceState() == Service.STATE.Inited && waitCount++ < 60) { Log.Info("Waiting for RM to start..."); Sharpen.Thread.Sleep(1500); } if (resourceManager.GetServiceState() != Service.STATE.Started) { // RM could have failed. throw new IOException("ResourceManager failed to start. Final state is " + resourceManager .GetServiceState()); } }
public static void Setup() { RMStateStore store = RMStateStoreFactory.GetStore(conf); conf.SetBoolean(YarnConfiguration.YarnAclEnable, true); AccessControlList adminACL = new AccessControlList(string.Empty); adminACL.AddGroup(SuperGroup); conf.Set(YarnConfiguration.YarnAdminAcl, adminACL.GetAclString()); resourceManager = new _MockRM_105(conf); new _Thread_127().Start(); int waitCount = 0; while (resourceManager.GetServiceState() == Service.STATE.Inited && waitCount++ < 60) { Log.Info("Waiting for RM to start..."); Sharpen.Thread.Sleep(1500); } if (resourceManager.GetServiceState() != Service.STATE.Started) { // RM could have failed. throw new IOException("ResourceManager failed to start. Final state is " + resourceManager .GetServiceState()); } UserGroupInformation owner = UserGroupInformation.CreateRemoteUser(AppOwner); rmClient = owner.DoAs(new _PrivilegedExceptionAction_152()); }