@Test public void testRegistered() throws Exception { new Context() {{ startResourceManager(); Protos.MasterInfo masterInfo = Protos.MasterInfo.newBuilder() .setId("master1").setIp(0).setPort(5050).build(); resourceManager.registered(new Registered(framework1, masterInfo)); verify(rmServices.workerStore).setFrameworkID(Option.apply(framework1)); resourceManager.connectionMonitor.expectMsgClass(Registered.class); resourceManager.reconciliationCoordinator.expectMsgClass(Registered.class); resourceManager.launchCoordinator.expectMsgClass(Registered.class); resourceManager.taskRouter.expectMsgClass(Registered.class); }}; }
protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store the assigned framework ID.", ex)); return; } launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store the assigned framework ID.", ex)); return; } launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store the assigned framework ID.", ex)); return; } launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } MesosResourceManager(
			// base class
			RpcService rpcService,
			String resourceManagerEndpointId,
			ResourceID resourceId,
			HighAvailabilityServices highAvailabilityServices,
			HeartbeatServices heartbeatServices,
			SlotManager slotManager,
			MetricRegistry metricRegistry,
			JobLeaderIdService jobLeaderIdService,
			ClusterInformation clusterInformation,
			FatalErrorHandler fatalErrorHandler,
			// Mesos specifics
			Configuration flinkConfig,
			MesosServices mesosServices,
			MesosConfiguration mesosConfig,
			MesosTaskManagerParameters taskManagerParameters,
			ContainerSpecification taskManagerContainerSpec,
			@Nullable String webUiUrl,
			JobManagerMetricGroup jobManagerMetricGroup); }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store the assigned framework ID.", ex)); return; } launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } MesosResourceManager(
			// base class
			RpcService rpcService,
			String resourceManagerEndpointId,
			ResourceID resourceId,
			HighAvailabilityServices highAvailabilityServices,
			HeartbeatServices heartbeatServices,
			SlotManager slotManager,
			MetricRegistry metricRegistry,
			JobLeaderIdService jobLeaderIdService,
			ClusterInformation clusterInformation,
			FatalErrorHandler fatalErrorHandler,
			// Mesos specifics
			Configuration flinkConfig,
			MesosServices mesosServices,
			MesosConfiguration mesosConfig,
			MesosTaskManagerParameters taskManagerParameters,
			ContainerSpecification taskManagerContainerSpec,
			@Nullable String webUiUrl,
			JobManagerMetricGroup jobManagerMetricGroup); @Override CompletableFuture<Void> onStop(); @Override Collection<ResourceProfile> startNewWorker(ResourceProfile resourceProfile); @Override boolean stopWorker(RegisteredMesosWorkerNode workerNode); void acceptOffers(AcceptOffers msg); void reconcile(ReconciliationCoordinator.Reconcile message); void taskTerminated(TaskMonitor.TaskTerminated message); }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store the assigned framework ID.", ex)); return; } launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } MesosResourceManager(
			// base class
			RpcService rpcService,
			String resourceManagerEndpointId,
			ResourceID resourceId,
			HighAvailabilityServices highAvailabilityServices,
			HeartbeatServices heartbeatServices,
			SlotManager slotManager,
			MetricRegistry metricRegistry,
			JobLeaderIdService jobLeaderIdService,
			ClusterInformation clusterInformation,
			FatalErrorHandler fatalErrorHandler,
			// Mesos specifics
			Configuration flinkConfig,
			MesosServices mesosServices,
			MesosConfiguration mesosConfig,
			MesosTaskManagerParameters taskManagerParameters,
			ContainerSpecification taskManagerContainerSpec,
			@Nullable String webUiUrl,
			JobManagerMetricGroup jobManagerMetricGroup); @Override CompletableFuture<Void> onStop(); @Override Collection<ResourceProfile> startNewWorker(ResourceProfile resourceProfile); @Override boolean stopWorker(RegisteredMesosWorkerNode workerNode); void acceptOffers(AcceptOffers msg); void reconcile(ReconciliationCoordinator.Reconcile message); void taskTerminated(TaskMonitor.TaskTerminated message);  }