本文整理汇总了Java中org.apache.mesos.Protos.Parameter方法的典型用法代码示例。如果您正苦于以下问题:Java Protos.Parameter方法的具体用法?Java Protos.Parameter怎么用?Java Protos.Parameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.mesos.Protos
的用法示例。
在下文中一共展示了Protos.Parameter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DockerScheduler
import org.apache.mesos.Protos; //导入方法依赖的package包/类
DockerScheduler(
LoggerWrapper loggerWrapper,
int desiredInstances,
Protos.CommandInfo.Builder commandInfoBuilder,
List<Protos.Volume> volumes,
List<Protos.Parameter> parameters,
final Map<String, Object> configuration,
PluginStepContext context
) {
this.loggerWrapper = loggerWrapper;
this.desiredInstances = desiredInstances;
this.commandInfoBuilder = commandInfoBuilder;
this.volumes = volumes;
this.parameters = parameters;
this.context = context;
this.imageName = configuration.get("docker_image").toString();
this.cpu = Double.parseDouble(configuration.get("docker_cpus").toString());
this.memory = Double.parseDouble(configuration.get("docker_memory").toString());
this.forcePullImage = Boolean.parseBoolean(configuration.get("docker_force_pull").toString());
this.constraints = new ConstraintsChecker(configuration.get("mesos_constraints").toString());
}
示例2: getDockerContainerInfo
import org.apache.mesos.Protos; //导入方法依赖的package包/类
private ContainerInfo getDockerContainerInfo(IDockerContainer config) {
Iterable<Protos.Parameter> parameters = Iterables.transform(config.getParameters(),
item -> Protos.Parameter.newBuilder().setKey(item.getName())
.setValue(item.getValue()).build());
ContainerInfo.DockerInfo.Builder dockerBuilder = ContainerInfo.DockerInfo.newBuilder()
.setImage(config.getImage()).addAllParameters(parameters);
return ContainerInfo.newBuilder()
.setType(ContainerInfo.Type.DOCKER)
.setDocker(dockerBuilder.build())
.addAllVolumes(executorSettings.getExecutorConfig().getVolumeMounts())
.build();
}
示例3: getDockerParameters
import org.apache.mesos.Protos; //导入方法依赖的package包/类
public List<Protos.Parameter> getDockerParameters() {
return taskInfo.getContainer().getDocker().getParametersList();
}