コード例 #1
0
        /// <exception cref="Org.Apache.Hadoop.Lib.Server.ServiceException"/>
        public override void PostInit()
        {
            base.PostInit();
            Instrumentation instrumentation = GetServer().Get <Instrumentation>();

            instrumentation.AddVariable(InstrumentationGroup, "unmanaged.fs", new _Variable_217
                                            (this));
            instrumentation.AddSampler(InstrumentationGroup, "unmanaged.fs", 60, new _Variable_223
                                           (this));
            Scheduler scheduler     = GetServer().Get <Scheduler>();
            int       purgeInterval = GetServiceConfig().GetInt(FsCachePurgeFrequency, 60);

            purgeTimeout = GetServiceConfig().GetLong(FsCachePurgeTimeout, 60);
            purgeTimeout = (purgeTimeout > 0) ? purgeTimeout : 0;
            if (purgeTimeout > 0)
            {
                scheduler.Schedule(new FileSystemAccessService.FileSystemCachePurger(this), purgeInterval
                                   , purgeInterval, TimeUnit.Seconds);
            }
        }