Exemplo n.º 1
0
 /// <exception cref="System.Exception"/>
 protected override void ServiceInit(Configuration conf)
 {
     if (this.appChecker == null)
     {
         this.appChecker = CreateAppCheckerService(conf);
     }
     AddService(appChecker);
     base.ServiceInit(conf);
 }
Exemplo n.º 2
0
        public static AppChecker CreateAppCheckerService(Configuration conf)
        {
            Type defaultCheckerClass;

            try
            {
                defaultCheckerClass = (Type)Sharpen.Runtime.GetType(YarnConfiguration.DefaultScmAppCheckerClass
                                                                    );
            }
            catch (Exception e)
            {
                throw new YarnRuntimeException("Invalid default scm app checker class" + YarnConfiguration
                                               .DefaultScmAppCheckerClass, e);
            }
            AppChecker checker = ReflectionUtils.NewInstance(conf.GetClass <AppChecker>(YarnConfiguration
                                                                                        .ScmAppCheckerClass, defaultCheckerClass), conf);

            return(checker);
        }
Exemplo n.º 3
0
 internal SCMStore(string name, AppChecker appChecker)
     : base(name)
 {
     this.appChecker = appChecker;
 }
Exemplo n.º 4
0
 public virtual void Setup()
 {
     this.checker = Org.Mockito.Mockito.Spy(new DummyAppChecker());
     this.store   = Org.Mockito.Mockito.Spy(new InMemorySCMStore(checker));
 }
Exemplo n.º 5
0
 public InMemorySCMStore(AppChecker appChecker)
     : base(typeof(Org.Apache.Hadoop.Yarn.Server.Sharedcachemanager.Store.InMemorySCMStore
                   ).FullName, appChecker)
 {
 }
Exemplo n.º 6
0
 public AppCheckTask(InMemorySCMStore _enclosing, AppChecker appChecker)
 {
     this._enclosing     = _enclosing;
     this.taskAppChecker = appChecker;
 }