Ejemplo n.º 1
0
        public virtual void StartUp()
        {
            Configuration conf = new Configuration();

            conf.Set(YarnConfiguration.ScmStoreClass, typeof(InMemorySCMStore).FullName);
            cleaner = Org.Mockito.Mockito.Mock <CleanerService>();
            service = Org.Mockito.Mockito.Spy(new SCMAdminProtocolService(cleaner));
            service.Init(conf);
            service.Start();
            YarnRPC    rpc        = YarnRPC.Create(new Configuration());
            IPEndPoint scmAddress = conf.GetSocketAddr(YarnConfiguration.ScmAdminAddress, YarnConfiguration
                                                       .DefaultScmAdminAddress, YarnConfiguration.DefaultScmAdminPort);

            SCMAdminProxy = (SCMAdminProtocol)rpc.GetProxy(typeof(SCMAdminProtocol), scmAddress
                                                           , conf);
            mockAdmin = Org.Mockito.Mockito.Mock <SCMAdminProtocol>();
            adminCLI  = new _SCMAdmin_90(new Configuration());
        }
Ejemplo n.º 2
0
        /// <exception cref="System.Exception"/>
        protected override void ServiceInit(Configuration conf)
        {
            this.store = CreateSCMStoreService(conf);
            AddService(store);
            CleanerService cs = CreateCleanerService(store);

            AddService(cs);
            SharedCacheUploaderService nms = CreateNMCacheUploaderSCMProtocolService(store);

            AddService(nms);
            ClientProtocolService cps = CreateClientProtocolService(store);

            AddService(cps);
            SCMAdminProtocolService saps = CreateSCMAdminProtocolService(cs);

            AddService(saps);
            SCMWebServer webUI = CreateSCMWebServer(this);

            AddService(webUI);
            // init metrics
            DefaultMetricsSystem.Initialize("SharedCacheManager");
            JvmMetrics.InitSingleton("SharedCacheManager", null);
            base.ServiceInit(conf);
        }
Ejemplo n.º 3
0
 private SCMAdminProtocolService CreateSCMAdminProtocolService(CleanerService cleanerService
                                                               )
 {
     return(new SCMAdminProtocolService(cleanerService));
 }
Ejemplo n.º 4
0
 public SCMAdminProtocolService(CleanerService cleanerService)
     : base(typeof(Org.Apache.Hadoop.Yarn.Server.Sharedcachemanager.SCMAdminProtocolService
                   ).FullName)
 {
     this.cleanerService = cleanerService;
 }