@Test public void testPrimaryWorkerComponentNumWorkersIsTwo() throws IOException { testCommons.yarnConfig.set("hadoop.registry.dns.domain-name", "testDomain"); testCommons = new ComponentTestCommons(TensorFlowRole.PRIMARY_WORKER); testCommons.setupTensorFlow(); TensorFlowRunJobParameters parameters = new TensorFlowRunJobParameters(); parameters.setWorkerResource(testCommons.resource); parameters.setName("testJobName"); parameters.setNumWorkers(2); parameters.setWorkerDockerImage("testWorkerDockerImage"); TensorFlowWorkerComponent workerComponent = createWorkerComponent(parameters); Component component = workerComponent.createComponent(); assertEquals(1L, (long) component.getNumberOfContainers()); verifyCommons(component, ImmutableMap.of( "yarn.service.container-state-report-as-service-state", "true")); }
@Override public Component createComponent() throws IOException { return createComponentInternal(); }
TensorFlowWorkerComponent extends AbstractComponent { @Override public Component createComponent() throws IOException { return createComponentInternal(); } }
TensorFlowWorkerComponent extends AbstractComponent { @Override public Component createComponent() throws IOException { return createComponentInternal(); } TensorFlowWorkerComponent(FileSystemOperations fsOperations,
                                   RemoteDirectoryManager remoteDirectoryManager,
                                   TensorFlowRunJobParameters parameters, Role role,
                                   TensorFlowLaunchCommandFactory launchCommandFactory,
                                   Configuration yarnConfig); }
TensorFlowWorkerComponent extends AbstractComponent { @Override public Component createComponent() throws IOException { return createComponentInternal(); } TensorFlowWorkerComponent(FileSystemOperations fsOperations,
                                   RemoteDirectoryManager remoteDirectoryManager,
                                   TensorFlowRunJobParameters parameters, Role role,
                                   TensorFlowLaunchCommandFactory launchCommandFactory,
                                   Configuration yarnConfig); @Override Component createComponent(); }
TensorFlowWorkerComponent extends AbstractComponent { @Override public Component createComponent() throws IOException { return createComponentInternal(); } TensorFlowWorkerComponent(FileSystemOperations fsOperations,
                                   RemoteDirectoryManager remoteDirectoryManager,
                                   TensorFlowRunJobParameters parameters, Role role,
                                   TensorFlowLaunchCommandFactory launchCommandFactory,
                                   Configuration yarnConfig); @Override Component createComponent();  }