本文整理汇总了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));
}
});
}
示例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();
}
示例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));
}
});
}
示例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));
}
});
}
示例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));
}
示例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());
}
示例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);
}
示例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;
}
示例9: slaveLost
import org.apache.mesos.Protos; //导入方法依赖的package包/类
public void slaveLost(SchedulerDriver schedulerDriver, Protos.SlaveID slaveID) {
fenzoScheduler.expireAllLeasesByVMId(slaveID.getValue());
}
示例10: slaveLost
import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void slaveLost(SchedulerDriver driver, Protos.SlaveID slaveId) {
mesosActor.tell(new SlaveLost(slaveId), ActorRef.noSender());
}
示例11: slaveId
import org.apache.mesos.Protos; //导入方法依赖的package包/类
public Protos.SlaveID slaveId() {
return slaveId;
}
示例12: SlaveLost
import org.apache.mesos.Protos; //导入方法依赖的package包/类
public SlaveLost(Protos.SlaveID slaveId) {
this.slaveId = slaveId;
}
示例13: getSlaveID
import org.apache.mesos.Protos; //导入方法依赖的package包/类
public Protos.SlaveID getSlaveID() {
return slaveID;
}
示例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;
}
示例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());
}