本文整理汇总了Java中org.apache.mesos.Protos.ExecutorID方法的典型用法代码示例。如果您正苦于以下问题:Java Protos.ExecutorID方法的具体用法?Java Protos.ExecutorID怎么用?Java Protos.ExecutorID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.mesos.Protos
的用法示例。
在下文中一共展示了Protos.ExecutorID方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testToExecutorId
import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Test
public void testToExecutorId() {
final String executorName = "dcos-0";
final Protos.ExecutorID executorID = CommonIdUtils.toExecutorId(executorName);
Assert.assertNotNull(executorID);
final String value = executorID.getValue();
Assert.assertTrue(StringUtils.isNotBlank(value));
Assert.assertTrue(value.contains("__"));
Assert.assertNotNull(UUID.fromString(value.split("__")[1]));
}
示例2: frameworkMessage
import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void frameworkMessage(SchedulerDriver driver,
Protos.ExecutorID executorId,
Protos.SlaveID slaveId,
byte[] data) {
LOGGER.info("Framework message: executorId={} slaveId={} data='{}'",
executorId.getValue(), slaveId.getValue(),
Arrays.toString(data));
}
示例3: executorLost
import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void executorLost(SchedulerDriver driver,
Protos.ExecutorID executorId,
Protos.SlaveID slaveId,
int status) {
LOGGER.info("Executor lost: executorId: {} slaveId: {} status: {}",
executorId.getValue(), slaveId.getValue(), status);
}
示例4: isRunningExecutor
import org.apache.mesos.Protos; //导入方法依赖的package包/类
private static boolean isRunningExecutor(Protos.ExecutorInfo executorInfo, Protos.Offer offer) {
for (Protos.ExecutorID execId : offer.getExecutorIdsList()) {
if (execId.equals(executorInfo.getExecutorId())) {
return true;
}
}
return false;
}
示例5: sendStatusUpdate
import org.apache.mesos.Protos; //导入方法依赖的package包/类
private void sendStatusUpdate(ExecutorDriver executorDriver, Protos.TaskState state, Protos.TaskID taskId, Protos.ExecutorID executorId) {
Protos.TaskStatus taskStatus = Protos.TaskStatus.newBuilder()
.setExecutorId(executorId)
.setTaskId(taskId)
.setState(state)
.setSource(Protos.TaskStatus.Source.SOURCE_EXECUTOR)
.build();
executorDriver.sendStatusUpdate(taskStatus);
}
示例6: getCompleteOffer
import org.apache.mesos.Protos; //导入方法依赖的package包/类
public static Protos.Offer getCompleteOffer(Protos.ExecutorID executorId, List<Protos.Resource> resources) {
Protos.Offer.Builder builder = getEmptyOfferBuilder();
builder.addAllResources(resources);
if (executorId != null) {
builder.addExecutorIds(executorId);
}
return builder.build();
}
示例7: 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));
}
示例8: 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);
}
示例9: sendFrameworkMessage
import org.apache.mesos.Protos; //导入方法依赖的package包/类
public Protos.Status sendFrameworkMessage(Protos.ExecutorID executorId, Protos.SlaveID slaveId, byte[] data) {
sentFrameworkMessages.add(new Message(executorId.getValue(), slaveId.getValue(), data));
return status;
}
示例10: executorId
import org.apache.mesos.Protos; //导入方法依赖的package包/类
public Protos.ExecutorID executorId() {
return executorId;
}
示例11: 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;
}
示例12: executorLost
import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void executorLost(SchedulerDriver schedulerDriver, Protos.ExecutorID executorID, Protos.SlaveID slaveID, int i) {
logger.info("executorLost()");
}
示例13: ExecutorLost
import org.apache.mesos.Protos; //导入方法依赖的package包/类
public ExecutorLost(Protos.ExecutorID executorId, Protos.SlaveID slaveId, int status) {
this.executorId = executorId;
this.slaveId = slaveId;
this.status = status;
}
示例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: executorLost
import org.apache.mesos.Protos; //导入方法依赖的package包/类
@Override
public void executorLost(SchedulerDriver driver, Protos.ExecutorID executorId, Protos.SlaveID slaveId, int status) {
logger.debug("[executorLost] executor" + json(executorId) + ", slave:" + json(slaveId) + ", status:" + status);
}