Skip to content

Commit

Permalink
Merge pull request #494 from mesos/bug/executor-name
Browse files Browse the repository at this point in the history
Executor name now uses Executor ID
  • Loading branch information
frankscholten committed Feb 10, 2016
2 parents 6691f32 + bb57288 commit 50cfefb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ public ByteString toData(String hostname, String ipAddress, ZonedDateTime zonedD
}

private Protos.ExecutorInfo.Builder newExecutorInfo(Configuration configuration) {
Protos.ExecutorInfo.Builder executorInfoBuilder = Protos.ExecutorInfo.newBuilder()
.setExecutorId(Protos.ExecutorID.newBuilder().setValue(UUID.randomUUID().toString()))
.setFrameworkId(frameworkState.getFrameworkID())
.setName("elasticsearch-executor-" + UUID.randomUUID().toString())
.setCommand(newCommandInfo(configuration));
Protos.ExecutorInfo.Builder executorInfoBuilder = Protos.ExecutorInfo.newBuilder();
executorInfoBuilder.setExecutorId(Protos.ExecutorID.newBuilder().setValue(UUID.randomUUID().toString()))
.setFrameworkId(frameworkState.getFrameworkID())
.setName("elasticsearch-executor-" + executorInfoBuilder.getExecutorId().getValue())
.setCommand(newCommandInfo(configuration));
if (configuration.isFrameworkUseDocker()) {
Protos.ContainerInfo.DockerInfo.Builder containerBuilder = Protos.ContainerInfo.DockerInfo.newBuilder()
.setImage(configuration.getExecutorImage())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public void testCreateTaskInfo() {

assertEquals(frameworkState.getFrameworkID(), taskInfo.getExecutor().getFrameworkId());
assertEquals(Configuration.DEFAULT_EXECUTOR_IMAGE, taskInfo.getExecutor().getContainer().getDocker().getImage());
assertEquals("elasticsearch-executor-" + taskInfo.getExecutor().getExecutorId().getValue(), taskInfo.getExecutor().getName());

assertEquals(2, taskInfo.getExecutor().getContainer().getVolumesCount());
assertEquals(CONTAINER_PATH_SETTINGS, taskInfo.getExecutor().getContainer().getVolumes(0).getContainerPath());
Expand Down

0 comments on commit 50cfefb

Please sign in to comment.