public virtual void Setup() { cProtocol = Org.Mockito.Mockito.Mock <ClientSCMProtocol>(); client = new _SharedCacheClientImpl_85(); // do nothing because it is mocked client.Init(new Configuration()); client.Start(); }
protected internal virtual void StopClientProxy() { if (this.scmClient != null) { RPC.StopProxy(this.scmClient); this.scmClient = null; } }
/// <exception cref="System.Exception"/> protected override void ServiceStart() { this.scmClient = CreateClientProxy(); if (Log.IsDebugEnabled()) { Log.Debug("Connecting to Shared Cache Manager at " + this.scmAddress); } base.ServiceStart(); }
public virtual void CleanUp() { if (store != null) { store.Stop(); store = null; } if (service != null) { service.Stop(); service = null; } if (clientSCMProxy != null) { RPC.StopProxy(clientSCMProxy); clientSCMProxy = null; } }
public virtual void StartUp() { Configuration conf = new Configuration(); conf.Set(YarnConfiguration.ScmStoreClass, typeof(InMemorySCMStore).FullName); conf.Set(YarnConfiguration.SharedCacheRoot, testDir.GetPath()); AppChecker appChecker = Org.Mockito.Mockito.Spy(new DummyAppChecker()); store = new InMemorySCMStore(appChecker); store.Init(conf); store.Start(); service = new ClientProtocolService(store); service.Init(conf); service.Start(); YarnRPC rpc = YarnRPC.Create(new Configuration()); IPEndPoint scmAddress = conf.GetSocketAddr(YarnConfiguration.ScmClientServerAddress , YarnConfiguration.DefaultScmClientServerAddress, YarnConfiguration.DefaultScmClientServerPort ); clientSCMProxy = (ClientSCMProtocol)rpc.GetProxy(typeof(ClientSCMProtocol), scmAddress , conf); }
public ClientSCMProtocolPBServiceImpl(ClientSCMProtocol impl) { this.real = impl; }