Esempio n. 1
0
        private NetworkTransport(
            ILocalAddressProvider localAddressProvider,
            ProtocolSerializer serializer,
            LocalObserver localObserver,
            IRemoteManagerFactory remoteManagerFactory,
            REEFFileNames fileNames)
        {
            _serializer = serializer;
            _fileNames  = fileNames;

            // Instantiate the remote manager.
            _remoteManager = remoteManagerFactory.GetInstance(localAddressProvider.LocalAddress, new ByteCodec());

            // Listen to the java bridge on the local end point.
            _remoteManager.RegisterObserver(localObserver);
            Logger.Log(Level.Info, "Local observer listening to java bridge on: [{0}]", _remoteManager.LocalEndpoint);

            // Instantiate a remote observer to send messages to the java bridge.
            IPEndPoint javaIpEndPoint = GetJavaBridgeEndpoint();

            Logger.Log(Level.Info, "Connecting to java bridge on: [{0}]", javaIpEndPoint);
            _remoteObserver = _remoteManager.GetRemoteObserver(javaIpEndPoint);

            // Negotiate the protocol.
            Send(0, new BridgeProtocol(100));
        }
Esempio n. 2
0
        private EvaluatorSettings(
            [Parameter(typeof(ApplicationIdentifier))] string applicationId,
            [Parameter(typeof(EvaluatorIdentifier))] string evaluatorId,
            [Parameter(typeof(EvaluatorHeartbeatPeriodInMs))] int heartbeatPeriodInMs,
            [Parameter(typeof(HeartbeatMaxRetry))] int maxHeartbeatRetries,
            [Parameter(typeof(RootContextConfiguration))] string rootContextConfigString,
            RuntimeClock clock,
            IRemoteManagerFactory remoteManagerFactory,
            REEFMessageCodec reefMessageCodec,
            IInjector injector)
        {
            _injector            = injector;
            _applicationId       = applicationId;
            _evaluatorId         = evaluatorId;
            _heartBeatPeriodInMs = heartbeatPeriodInMs;
            _maxHeartbeatRetries = maxHeartbeatRetries;
            _clock = clock;

            if (string.IsNullOrWhiteSpace(rootContextConfigString))
            {
                Utilities.Diagnostics.Exceptions.Throw(
                    new ArgumentException("empty or null rootContextConfigString"), Logger);
            }
            _rootContextConfig        = new ContextConfiguration(rootContextConfigString);
            _rootTaskConfiguration    = CreateTaskConfiguration();
            _rootServiceConfiguration = CreateRootServiceConfiguration();

            _remoteManager  = remoteManagerFactory.GetInstance(reefMessageCodec);
            _operationState = EvaluatorOperationState.OPERATIONAL;
        }
Esempio n. 3
0
        private StreamingNetworkService(
            IObserver <NsMessage <T> > universalObserver,
            IObserver <IRemoteMessage <NsMessage <T> > > remoteMessageUniversalObserver,
            INameClient nameClient,
            StreamingRemoteManagerFactory remoteManagerFactory,
            NsMessageStreamingCodec <T> codec,
            ILocalAddressProvider localAddressProvider)
        {
            _remoteManager = remoteManagerFactory.GetInstance(localAddressProvider.LocalAddress, codec);

            if (universalObserver != null)
            {
                // Create and register incoming message handler
                // TODO[REEF-419] This should use the TcpPortProvider mechanism
                var anyEndpoint = new IPEndPoint(IPAddress.Any, 0);
                _universalObserverDisposable = _remoteManager.RegisterObserver(anyEndpoint, universalObserver);
            }
            else
            {
                _universalObserverDisposable = null;
            }

            _remoteMessageUniversalObserver = remoteMessageUniversalObserver != null?
                                              _remoteManager.RegisterObserver(remoteMessageUniversalObserver) : null;

            _nameClient    = nameClient;
            _connectionMap = new Dictionary <IIdentifier, IConnection <T> >();

            Logger.Log(Level.Verbose, "Started network service");
        }
Esempio n. 4
0
 private NewOpenRastaSite(
     IFileSystem fileSystem,
     IEnvironment environment,
     IPackageManager packageManager,
     IRemoteManager remotes)
 {
     _fileSystem     = fileSystem;
     _environment    = environment;
     _packageManager = packageManager;
     _remotes        = remotes;
 }
 /// <summary>
 /// Creates a new NsConnection between two hosts.
 /// </summary>
 /// <param name="sourceId">The identifier of the sender</param>
 /// <param name="destId">The identifier of the receiver</param>
 /// <param name="nameClient">The NameClient used for naming lookup</param>
 /// <param name="remoteManager">The remote manager used for network communication</param>
 /// <param name="connectionMap">A cache of opened connections.  Will remove itself from
 /// the cache when the NsConnection is disposed.</param>
 public WritableNsConnection(
     IIdentifier sourceId,
     IIdentifier destId,
     INameClient nameClient,
     IRemoteManager <WritableNsMessage <T> > remoteManager,
     Dictionary <IIdentifier, IConnection <T> > connectionMap)
 {
     _sourceId      = sourceId;
     _destId        = destId;
     _nameClient    = nameClient;
     _remoteManager = remoteManager;
     _connectionMap = connectionMap;
 }
Esempio n. 6
0
 public ClientJobStatusHandler(
     IRemoteManager <IRemoteMessage <REEFMessage> > remoteManager,
     IClock clock,
     IObserver <JobControlProto> jobControlHandler,
     string jobId,
     string clientRID)
 {
     _clock             = clock;
     _jobId             = jobId;
     _jobStatusHandler  = null;
     _jobControlChannel = null;
     //_jobStatusHandler = remoteManager.GetRemoteObserver()
     //_jobControlChannel = remoteManager.RegisterObserver()
 }
Esempio n. 7
0
 public HeartBeatManager(EvaluatorSettings settings, IRemoteIdentifier remoteId)
 {
     using (LOGGER.LogFunction("HeartBeatManager::HeartBeatManager"))
     {
         _remoteManager = settings.RemoteManager;
         _remoteId      = remoteId;
         _evaluatorId   = settings.EvalutorId;
         _observer      = _remoteManager.GetRemoteObserver(new RemoteEventEndPoint <REEFMessage>(_remoteId));
         _clock         = settings.RuntimeClock;
         _heartBeatPeriodInMillSeconds = settings.HeartBeatPeriodInMs;
         _maxHeartbeatRetries          = settings.MaxHeartbeatFailures;
         EvaluatorSettings             = settings;
         MachineStatus.ToString(); // kick start the CPU perf counter
     }
 }
Esempio n. 8
0
        private WritableNetworkService(
            [Parameter(typeof(NetworkServiceOptions.NetworkServicePort))] int nsPort,
            IObserver <WritableNsMessage <T> > messageHandler,
            IIdentifierFactory idFactory,
            INameClient nameClient,
            WritableRemoteManagerFactory remoteManagerFactory)
        {
            IPAddress localAddress = NetworkUtils.LocalIPAddress;

            _remoteManager  = remoteManagerFactory.GetInstance <WritableNsMessage <T> >(localAddress, nsPort);
            _messageHandler = messageHandler;

            _nameClient    = nameClient;
            _connectionMap = new Dictionary <IIdentifier, IConnection <T> >();

            Logger.Log(Level.Info, "Started network service");
        }
Esempio n. 9
0
        public NetworkService(
            [Parameter(typeof(NetworkServiceOptions.NetworkServicePort))] int nsPort,
            [Parameter(typeof(NamingConfigurationOptions.NameServerAddress))] string nameServerAddr,
            [Parameter(typeof(NamingConfigurationOptions.NameServerPort))] int nameServerPort,
            IObserver <NsMessage <T> > messageHandler,
            IIdentifierFactory idFactory,
            ICodec <T> codec)
        {
            _codec = new NsMessageCodec <T>(codec, idFactory);

            IPAddress localAddress = NetworkUtils.LocalIPAddress;

            _remoteManager  = new DefaultRemoteManager <NsMessage <T> >(localAddress, nsPort, _codec);
            _messageHandler = messageHandler;

            NamingClient   = new NameClient(nameServerAddr, nameServerPort);
            _connectionMap = new Dictionary <IIdentifier, IConnection <T> >();

            LOGGER.Log(Level.Info, "Started network service");
        }
Esempio n. 10
0
        public NetworkService(
            [Parameter(typeof(NetworkServiceOptions.NetworkServicePort))] int nsPort,
            IObserver <NsMessage <T> > messageHandler,
            IIdentifierFactory idFactory,
            ICodec <T> codec,
            INameClient nameClient,
            IRemoteManagerFactory remoteManagerFactory)
        {
            _codec = new NsMessageCodec <T>(codec, idFactory);

            IPAddress localAddress = NetworkUtils.LocalIPAddress;

            _remoteManager  = remoteManagerFactory.GetInstance(localAddress, nsPort, _codec);
            _messageHandler = messageHandler;

            NamingClient   = nameClient;
            _connectionMap = new Dictionary <IIdentifier, IConnection <T> >();

            LOGGER.Log(Level.Info, "Started network service");
        }
Esempio n. 11
0
        private EvaluatorSettings(
            [Parameter(typeof(ApplicationIdentifier))] string applicationId,
            [Parameter(typeof(EvaluatorIdentifier))] string evaluatorId,
            [Parameter(typeof(EvaluatorHeartbeatPeriodInMs))] int heartbeatPeriodInMs,
            [Parameter(typeof(HeartbeatMaxRetry))] int maxHeartbeatRetries,
            IClock clock,
            IRemoteManagerFactory remoteManagerFactory,
            REEFMessageCodec reefMessageCodec,
            INameClient nameClient)
        {
            _applicationId       = applicationId;
            _evaluatorId         = evaluatorId;
            _heartBeatPeriodInMs = heartbeatPeriodInMs;
            _maxHeartbeatRetries = maxHeartbeatRetries;
            _clock = clock;

            _remoteManager = remoteManagerFactory.GetInstance(reefMessageCodec);
            OperationState = EvaluatorOperationState.OPERATIONAL;
            NameClient     = nameClient;
        }
Esempio n. 12
0
        public DriverManager(
            IInjector injector,
            ResourceCatalogImpl resourceCatalog,
            IRemoteManager <REEFMessage> remoteManager,
            IInjectionFuture <IClock> clockFuture,
            IInjectionFuture <IResourceRequestHandler> futureResourceRequestHandler,
            ClientJobStatusHandler clientJobStatusHandler,
            string clientRId)
        {
            _injector        = injector;
            _clockFuture     = clockFuture;
            _resourceCatalog = resourceCatalog;
            _futureResourceRequestHandler = futureResourceRequestHandler;
            _clientJobStatusHandler       = clientJobStatusHandler;

            _heartbeatConnectionChannel = null;
            _errorChannel        = null;
            _runtimeErrorHandler = null;
            LOGGER.Log(Level.Info, "DriverManager instantiated");
        }
Esempio n. 13
0
        private EvaluatorSettings(
            [Parameter(typeof(ApplicationIdentifier))] string applicationId,
            [Parameter(typeof(EvaluatorIdentifier))] string evaluatorId,
            [Parameter(typeof(EvaluatorHeartbeatPeriodInMs))] int heartbeatPeriodInMs,
            [Parameter(typeof(HeartbeatMaxRetry))] int maxHeartbeatRetries,
            IClock clock,
            IRemoteManagerFactory remoteManagerFactory,
            REEFMessageCodec reefMessageCodec,
            INameClient nameClient)
        {
            _applicationId = applicationId;
            _evaluatorId = evaluatorId;
            _heartBeatPeriodInMs = heartbeatPeriodInMs;
            _maxHeartbeatRetries = maxHeartbeatRetries;
            _clock = clock;

            _remoteManager = remoteManagerFactory.GetInstance(reefMessageCodec);
            OperationState = EvaluatorOperationState.OPERATIONAL;
            NameClient = nameClient;
        }
 private HeartBeatManager(
     EvaluatorSettings settings,
     IInjectionFuture<EvaluatorRuntime> evaluatorRuntime,
     IInjectionFuture<ContextManager> contextManager,
     [Parameter(typeof(ErrorHandlerRid))] string errorHandlerRid)
 {
     using (LOGGER.LogFunction("HeartBeatManager::HeartBeatManager"))
     {
         _evaluatorSettings = settings;
         _evaluatorRuntime = evaluatorRuntime;
         _contextManager = contextManager;
         _remoteManager = settings.RemoteManager;
         _remoteId = new SocketRemoteIdentifier(NetUtilities.ParseIpEndpoint(errorHandlerRid));
         _observer = _remoteManager.GetRemoteObserver(new RemoteEventEndPoint<REEFMessage>(_remoteId));
         _clock = settings.RuntimeClock;
         _heartBeatPeriodInMillSeconds = settings.HeartBeatPeriodInMs;
         _maxHeartbeatRetries = settings.MaxHeartbeatRetries;
         MachineStatus.ToString(); // kick start the CPU perf counter
     }
 }
Esempio n. 15
0
 private HeartBeatManager(
     EvaluatorSettings settings,
     IInjectionFuture <EvaluatorRuntime> evaluatorRuntime,
     IInjectionFuture <ContextManager> contextManager,
     [Parameter(typeof(ErrorHandlerRid))] string errorHandlerRid)
 {
     using (LOGGER.LogFunction("HeartBeatManager::HeartBeatManager"))
     {
         _evaluatorSettings            = settings;
         _evaluatorRuntime             = evaluatorRuntime;
         _contextManager               = contextManager;
         _remoteManager                = settings.RemoteManager;
         _remoteId                     = new SocketRemoteIdentifier(NetUtilities.ParseIpEndpoint(errorHandlerRid));
         _observer                     = _remoteManager.GetRemoteObserver(new RemoteEventEndPoint <REEFMessage>(_remoteId));
         _clock                        = settings.RuntimeClock;
         _heartBeatPeriodInMillSeconds = settings.HeartBeatPeriodInMs;
         _maxHeartbeatRetries          = settings.MaxHeartbeatRetries;
         MachineStatus.ToString(); // kick start the CPU perf counter
     }
 }
Esempio n. 16
0
 public EvaluatorSettings(
     string applicationId,
     string evaluatorId,
     int heartbeatPeriodInMs,
     int maxHeartbeatRetries,
     ContextConfiguration rootContextConfig,
     IClock clock,
     IRemoteManager <REEFMessage> remoteManager,
     IInjector injecor)
 {
     if (string.IsNullOrWhiteSpace(evaluatorId))
     {
         throw new ArgumentNullException("evaluatorId");
     }
     if (rootContextConfig == null)
     {
         throw new ArgumentNullException("rootContextConfig");
     }
     if (clock == null)
     {
         throw new ArgumentNullException("clock");
     }
     if (remoteManager == null)
     {
         throw new ArgumentNullException("remoteManager");
     }
     if (injecor == null)
     {
         throw new ArgumentNullException("injecor");
     }
     _applicationId       = applicationId;
     _evaluatorId         = evaluatorId;
     _heartBeatPeriodInMs = heartbeatPeriodInMs;
     _maxHeartbeatRetries = maxHeartbeatRetries;
     _rootContextConfig   = rootContextConfig;
     _clock          = clock;
     _remoteManager  = remoteManager;
     _injector       = injecor;
     _operationState = EvaluatorOperationState.OPERATIONAL;
 }
Esempio n. 17
0
 public EvaluatorSettings(
     string applicationId,
     string evaluatorId,
     int heartbeatPeriodInMs,
     int maxHeartbeatRetries,
     ContextConfiguration rootContextConfig,
     IClock clock,
     IRemoteManager<REEFMessage> remoteManager,
     IInjector injecor)
 {
     if (string.IsNullOrWhiteSpace(evaluatorId))
     {
         throw new ArgumentNullException("evaluatorId");
     }
     if (rootContextConfig == null)
     {
         throw new ArgumentNullException("rootContextConfig");
     }
     if (clock == null)
     {
         throw new ArgumentNullException("clock");
     }
     if (remoteManager == null)
     {
         throw new ArgumentNullException("remoteManager");
     }
     if (injecor == null)
     {
         throw new ArgumentNullException("injecor");
     }
     _applicationId = applicationId;
     _evaluatorId = evaluatorId;
     _heartBeatPeriodInMs = heartbeatPeriodInMs;
     _maxHeartbeatRetries = maxHeartbeatRetries;
     _rootContextConfig = rootContextConfig;
     _clock = clock;
     _remoteManager = remoteManager;
     _injector = injecor;
     _operationState = EvaluatorOperationState.OPERATIONAL;
 }
Esempio n. 18
0
        private StreamingNetworkService(
            IObserver <NsMessage <T> > messageHandler,
            IIdentifierFactory idFactory,
            INameClient nameClient,
            StreamingRemoteManagerFactory remoteManagerFactory,
            NsMessageStreamingCodec <T> codec,
            IInjector injector)
        {
            IPAddress localAddress = NetworkUtils.LocalIPAddress;

            _remoteManager = remoteManagerFactory.GetInstance(localAddress, codec);

            // Create and register incoming message handler
            // TODO[REEF-419] This should use the TcpPortProvider mechanism
            var anyEndpoint = new IPEndPoint(IPAddress.Any, 0);

            _messageHandlerDisposable = _remoteManager.RegisterObserver(anyEndpoint, messageHandler);

            _nameClient    = nameClient;
            _connectionMap = new Dictionary <IIdentifier, IConnection <T> >();

            Logger.Log(Level.Info, "Started network service");
        }
Esempio n. 19
0
        public EvaluatorRuntime(
            ContextManager contextManager,
            HeartBeatManager heartBeatManager)
        {
            using (LOGGER.LogFunction("EvaluatorRuntime::EvaluatorRuntime"))
            {
                _clock            = heartBeatManager.EvaluatorSettings.RuntimeClock;
                _heartBeatManager = heartBeatManager;
                _contextManager   = contextManager;
                _evaluatorId      = heartBeatManager.EvaluatorSettings.EvalutorId;
                _remoteManager    = heartBeatManager.EvaluatorSettings.RemoteManager;

                ReefMessageProtoObserver driverObserver = new ReefMessageProtoObserver();

                // subscribe to driver proto message
                driverObserver.Subscribe(o => OnNext(o.Message));

                // register the driver observer
                _evaluatorControlChannel = _remoteManager.RegisterObserver(driverObserver);

                // start the hearbeat
                _clock.ScheduleAlarm(0, heartBeatManager);
            }
        }
Esempio n. 20
0
 internal void SetRemoteManager(IRemoteManager remoteManager)
 {
     _remoteManager = remoteManager;
 }
Esempio n. 21
0
        private EvaluatorSettings(
            [Parameter(typeof(ApplicationIdentifier))] string applicationId,
            [Parameter(typeof(EvaluatorIdentifier))] string evaluatorId,
            [Parameter(typeof(EvaluatorHeartbeatPeriodInMs))] int heartbeatPeriodInMs,
            [Parameter(typeof(HeartbeatMaxRetry))] int maxHeartbeatRetries,
            [Parameter(typeof(RootContextConfiguration))] string rootContextConfigString,
            AvroConfigurationSerializer serializer,
            RuntimeClock clock,
            IRemoteManagerFactory remoteManagerFactory,
            REEFMessageCodec reefMessageCodec,
            IInjector injector,
            INameClient nameClient)
        {
            _serializer = serializer;
            _injector = injector;
            _applicationId = applicationId;
            _evaluatorId = evaluatorId;
            _heartBeatPeriodInMs = heartbeatPeriodInMs;
            _maxHeartbeatRetries = maxHeartbeatRetries;
            _clock = clock;

            if (string.IsNullOrWhiteSpace(rootContextConfigString))
            {
                Utilities.Diagnostics.Exceptions.Throw(
                    new ArgumentException("empty or null rootContextConfigString"), Logger);
            }
            _rootContextConfig = _serializer.FromString(rootContextConfigString);

            try
            {
                _rootContextId = injector.ForkInjector(_rootContextConfig).GetNamedInstance<ContextConfigurationOptions.ContextIdentifier, string>();
            }
            catch (InjectionException)
            {
                Logger.Log(Level.Info, "Using deprecated ContextConfiguration.");

                // TODO[JIRA REEF-1167]: Remove this catch.
                var deprecatedContextConfig = new Context.ContextConfiguration(rootContextConfigString);
                _rootContextConfig = deprecatedContextConfig;
                _rootContextId = deprecatedContextConfig.Id;
            }

            _rootTaskConfiguration = CreateTaskConfiguration();
            _rootServiceConfiguration = CreateRootServiceConfiguration();

            _remoteManager = remoteManagerFactory.GetInstance(reefMessageCodec);
            _operationState = EvaluatorOperationState.OPERATIONAL;
            _nameClient = nameClient;
        }
Esempio n. 22
0
        public static void Main(string[] args)
        {
            try
            {
                Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "START: {0} Evaluator::InitInjector.",
                                                DateTime.Now));
                Stopwatch timer = new Stopwatch();
                InitInjector();
                SetCustomTraceListners();  // _logger is reset by this.
                timer.Stop();
                Console.WriteLine(string.Format(CultureInfo.InvariantCulture,
                                                "EXIT: {0} Evaluator::InitInjector. Duration: [{1}].", DateTime.Now, timer.Elapsed));


                using (_logger.LogScope("Evaluator::Main"))
                {
                    // Wait for the debugger, if enabled
                    AttachDebuggerIfEnabled();

                    // Register our exception handler
                    AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;

                    // Fetch some settings from the ConfigurationManager
                    SetHeartbeatPeriod();
                    SetHeartbeatMaxRetry();


                    // Parse the command line
                    if (args.Count() < 2)
                    {
                        var e = new InvalidOperationException("must supply at least the rId and evaluator config file");
                        Utilities.Diagnostics.Exceptions.Throw(e, _logger);
                    }

                    // remote driver Id
                    string rId = args[0];

                    // evaluator configuraiton file
                    string evaluatorConfigurationPath = args[1];

                    // Parse the evaluator configuration.
                    _evaluatorConfig = new EvaluatorConfigurations(evaluatorConfigurationPath);

                    ContextConfiguration            rootContextConfiguration = _evaluatorConfig.RootContextConfiguration;
                    Optional <TaskConfiguration>    rootTaskConfig           = _evaluatorConfig.TaskConfiguration;
                    Optional <ServiceConfiguration> rootServiceConfig        = _evaluatorConfig.RootServiceConfiguration;

                    // remoteManager used as client-only in evaluator
                    IRemoteManager <REEFMessage> remoteManager = _injector.GetInstance <IRemoteManagerFactory>().GetInstance(new REEFMessageCodec());
                    IRemoteIdentifier            remoteId      = new SocketRemoteIdentifier(NetUtilities.ParseIpEndpoint(rId));


                    RuntimeClock clock = InstantiateClock();
                    _logger.Log(Level.Info, "Application Id: " + _evaluatorConfig.ApplicationId);
                    EvaluatorSettings evaluatorSettings = new EvaluatorSettings(
                        _evaluatorConfig.ApplicationId,
                        _evaluatorConfig.EvaluatorId,
                        _heartbeatPeriodInMs,
                        _heartbeatMaxRetry,
                        rootContextConfiguration,
                        clock,
                        remoteManager,
                        _injector);

                    HeartBeatManager heartBeatManager = new HeartBeatManager(evaluatorSettings, remoteId);
                    ContextManager   contextManager   = new ContextManager(heartBeatManager, rootServiceConfig,
                                                                           rootTaskConfig);
                    EvaluatorRuntime evaluatorRuntime = new EvaluatorRuntime(contextManager, heartBeatManager);

                    // TODO: replace with injectionFuture
                    heartBeatManager._evaluatorRuntime = evaluatorRuntime;
                    heartBeatManager._contextManager   = contextManager;

                    SetRuntimeHandlers(evaluatorRuntime, clock);


                    Task evaluatorTask = Task.Run(new Action(clock.Run));
                    evaluatorTask.Wait();
                }
            }
            catch (Exception e)
            {
                Fail(e);
            }
        }
Esempio n. 23
0
        private EvaluatorSettings(
            [Parameter(typeof(ApplicationIdentifier))] string applicationId,
            [Parameter(typeof(EvaluatorIdentifier))] string evaluatorId,
            [Parameter(typeof(EvaluatorHeartbeatPeriodInMs))] int heartbeatPeriodInMs,
            [Parameter(typeof(HeartbeatMaxRetry))] int maxHeartbeatRetries,
            [Parameter(typeof(RootContextConfiguration))] string rootContextConfigString,
            RuntimeClock clock,
            IRemoteManagerFactory remoteManagerFactory,
            REEFMessageCodec reefMessageCodec,
            IInjector injector)
        {
            _injector = injector;
            _applicationId = applicationId;
            _evaluatorId = evaluatorId;
            _heartBeatPeriodInMs = heartbeatPeriodInMs;
            _maxHeartbeatRetries = maxHeartbeatRetries;
            _clock = clock;

            if (string.IsNullOrWhiteSpace(rootContextConfigString))
            {
                Utilities.Diagnostics.Exceptions.Throw(
                    new ArgumentException("empty or null rootContextConfigString"), Logger);
            }
            _rootContextConfig = new ContextConfiguration(rootContextConfigString);
            _rootTaskConfiguration = CreateTaskConfiguration();
            _rootServiceConfiguration = CreateRootServiceConfiguration();

            _remoteManager = remoteManagerFactory.GetInstance(reefMessageCodec);
            _operationState = EvaluatorOperationState.OPERATIONAL;
        }