当前位置: 首页>>代码示例>>Java>>正文


Java Protos.SlaveID方法代码示例

本文整理汇总了Java中org.apache.mesos.Protos.SlaveID方法的典型用法代码示例。如果您正苦于以下问题:Java Protos.SlaveID方法的具体用法?Java Protos.SlaveID怎么用?Java Protos.SlaveID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.mesos.Protos的用法示例。


在下文中一共展示了Protos.SlaveID方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: frameworkMessage

import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void frameworkMessage(SchedulerDriver driver, final Protos.ExecutorID executorId, final Protos.SlaveID slaveId, final byte[] data) {
	runAsync(new Runnable() {
		@Override
		public void run() {
			MesosResourceManager.this.frameworkMessage(new FrameworkMessage(executorId, slaveId, data));
		}
	});
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:10,代码来源:MesosResourceManager.java

示例2: getTaskInfo

import org.apache.mesos.Protos; //导入方法依赖的package包/类
private Protos.TaskInfo getTaskInfo(Protos.SlaveID slaveID, final TaskAssignmentResult result) {
	ProcessorTask t = (ProcessorTask) result.getRequest();

	Protos.TaskID pTaskId = Protos.TaskID.newBuilder().setValue(t.getId()).build();

	// DockerInfo docker = DockerInfo.newBuilder()
	// .setImage(t.getProcessor().docker)
	// .build();
	//
	// ContainerInfo container = ContainerInfo.newBuilder()
	// .setDocker(docker)
	// .setType(ContainerInfo.Type.DOCKER)
	// .build();

	ExecutorID eid = ExecutorID.newBuilder().setValue(t.getId()).build();

	CommandInfo ci = CommandInfo.newBuilder().setValue(configuration.executorCommand).build();

	ExecutorInfo executor = ExecutorInfo.newBuilder().setExecutorId(eid).setFrameworkId(frameworkId)
			// .setContainer(container)
			.setCommand(ci).build();

	ByteString data = ByteString.copyFromUtf8(t.getMessage());

	Label processorLabel = Label.newBuilder().setKey("processor").setValue(t.getProcessor().toJson())
			.build();

	Label messageLabel = Label.newBuilder().setKey("message").setValueBytes(data).build();
	Labels labels = Labels.newBuilder().addLabels(processorLabel).addLabels(messageLabel).build();

	return Protos.TaskInfo.newBuilder().setName("task " + pTaskId.getValue()).setTaskId(pTaskId).setSlaveId(slaveID)
			.setLabels(labels).setData(data)
			.addResources(Protos.Resource.newBuilder().setName("cpus").setType(Protos.Value.Type.SCALAR)
					.setScalar(Protos.Value.Scalar.newBuilder().setValue(t.getCPUs())))
			.addResources(Protos.Resource.newBuilder().setName("mem").setType(Protos.Value.Type.SCALAR)
					.setScalar(Protos.Value.Scalar.newBuilder().setValue(t.getMemory())))
			// .setContainer(container)
			// .setCommand(Protos.CommandInfo.newBuilder().setShell(false))
			.setExecutor(executor).build();
}
 
开发者ID:WTIGER001,项目名称:Brigade,代码行数:41,代码来源:Framework.java

示例3: executorLost

import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void executorLost(SchedulerDriver driver, final Protos.ExecutorID executorId, final Protos.SlaveID slaveId, final int status) {
	runAsync(new Runnable() {
		@Override
		public void run() {
			MesosResourceManager.this.executorLost(new ExecutorLost(executorId, slaveId, status));
		}
	});
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:10,代码来源:MesosResourceManager.java

示例4: slaveLost

import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void slaveLost(SchedulerDriver driver, final Protos.SlaveID slaveId) {
	runAsync(new Runnable() {
		@Override
		public void run() {
			MesosResourceManager.this.slaveLost(new SlaveLost(slaveId));
		}
	});
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:10,代码来源:MesosResourceManager.java

示例5: frameworkMessage

import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void frameworkMessage(final SchedulerDriver schedulerDriver, final Protos.ExecutorID executorID, final Protos.SlaveID slaveID, final byte[] bytes) {
    log.trace("call frameworkMessage slaveID: {}, bytes: {}", slaveID, new String(bytes));
}
 
开发者ID:elasticjob,项目名称:elastic-job-cloud,代码行数:5,代码来源:SchedulerEngine.java

示例6: slaveLost

import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void slaveLost(final SchedulerDriver schedulerDriver, final Protos.SlaveID slaveID) {
    log.warn("call slaveLost slaveID is: {}", slaveID);
    taskScheduler.expireAllLeasesByVMId(slaveID.getValue());
}
 
开发者ID:elasticjob,项目名称:elastic-job-cloud,代码行数:6,代码来源:SchedulerEngine.java

示例7: executorLost

import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void executorLost(final SchedulerDriver schedulerDriver, final Protos.ExecutorID executorID, final Protos.SlaveID slaveID, final int i) {
    log.warn("call executorLost slaveID is: {}, executorID is: {}", slaveID, executorID);
}
 
开发者ID:elasticjob,项目名称:elastic-job-cloud,代码行数:5,代码来源:SchedulerEngine.java

示例8: FrameworkMessage

import org.apache.mesos.Protos; //导入方法依赖的package包/类
public FrameworkMessage(Protos.ExecutorID executorId, Protos.SlaveID slaveId, byte[] data) {
	this.executorId = executorId;
	this.slaveId = slaveId;
	this.data = data;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:6,代码来源:FrameworkMessage.java

示例9: slaveLost

import org.apache.mesos.Protos; //导入方法依赖的package包/类
public void slaveLost(SchedulerDriver schedulerDriver, Protos.SlaveID slaveID) {
    fenzoScheduler.expireAllLeasesByVMId(slaveID.getValue());
}
 
开发者ID:mesos-magellan,项目名称:faleiro,代码行数:4,代码来源:MagellanFramework.java

示例10: slaveLost

import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void slaveLost(SchedulerDriver driver, Protos.SlaveID slaveId) {
	mesosActor.tell(new SlaveLost(slaveId), ActorRef.noSender());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:SchedulerProxy.java

示例11: slaveId

import org.apache.mesos.Protos; //导入方法依赖的package包/类
public Protos.SlaveID slaveId() {
	return slaveId;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:4,代码来源:FrameworkMessage.java

示例12: SlaveLost

import org.apache.mesos.Protos; //导入方法依赖的package包/类
public SlaveLost(Protos.SlaveID slaveId) {
	this.slaveId = slaveId;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:4,代码来源:SlaveLost.java

示例13: getSlaveID

import org.apache.mesos.Protos; //导入方法依赖的package包/类
public Protos.SlaveID getSlaveID() {
    return slaveID;
}
 
开发者ID:retz,项目名称:retz,代码行数:4,代码来源:OfferAcceptor.java

示例14: sendFrameworkMessage

import org.apache.mesos.Protos; //导入方法依赖的package包/类
public Protos.Status sendFrameworkMessage(Protos.ExecutorID executorID,
                                          Protos.SlaveID slaveID,
                                          byte[] data) {
    return Protos.Status.DRIVER_RUNNING;
}
 
开发者ID:retz,项目名称:retz,代码行数:6,代码来源:LocalSchedulerDriver.java

示例15: frameworkMessage

import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void frameworkMessage(SchedulerDriver driver, Protos.ExecutorID executorId, Protos.SlaveID slaveId, byte[] data) {
	mesosActor.tell(new FrameworkMessage(executorId, slaveId, data), ActorRef.noSender());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:SchedulerProxy.java


注:本文中的org.apache.mesos.Protos.SlaveID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。