Example #1
0
        public override void Init()
        {
            _logger.info("Initiating metrics...");
            if (_metricsBuilt && _reporter.Empty)
            {
                _logger.warn("Several metrics were enabled but no exporting option was configured to report values to. " + "Disabling kernel metrics extension.");
                _life.clear();
            }

            if (!_reporter.Empty && !_metricsBuilt)
            {
                _logger.warn("Exporting tool have been configured to report values to but no metrics were enabled. " + "Disabling kernel metrics extension.");
                _life.clear();
            }

            _life.init();
        }
Example #2
0
        private SegmentedRaftLog CreateRaftLog(long rotateAtSize, string pruneStrategy)
        {
            if (_fileSystem == null)
            {
                _fileSystem = new EphemeralFileSystemAbstraction();
            }

            File directory = new File(RAFT_LOG_DIRECTORY_NAME);

            _fileSystem.mkdir(directory);

            LogProvider            logProvider     = Instance;
            CoreLogPruningStrategy pruningStrategy = (new CoreLogPruningStrategyFactory(pruneStrategy, logProvider)).NewInstance();
            SegmentedRaftLog       newRaftLog      = new SegmentedRaftLog(_fileSystem, directory, rotateAtSize, new DummyRaftableContentSerializer(), logProvider, 8, Clocks.systemClock(), new OnDemandJobScheduler(), pruningStrategy);

            _life.add(newRaftLog);
            _life.init();
            _life.start();

            return(newRaftLog);
        }
 public override void Init()
 {
     _life.init();
 }