- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中io.druid.indexing.overlord.ZkWorker.getRunningTasks()
方法的一些代码示例,展示了ZkWorker.getRunningTasks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZkWorker.getRunningTasks()
方法的具体详情如下:
包路径:io.druid.indexing.overlord.ZkWorker
类名称:ZkWorker
方法名:getRunningTasks
暂无
代码示例来源:origin: com.n3twork.druid/druid-indexing-service
public boolean isRunningTask(String taskId)
{
return getRunningTasks().containsKey(taskId);
}
代码示例来源:origin: io.druid/druid-indexing-service
public boolean isRunningTask(String taskId)
{
return getRunningTasks().containsKey(taskId);
}
代码示例来源:origin: io.druid/druid-indexing-service
@JsonProperty("runningTasks")
public Collection<String> getRunningTaskIds()
{
return getRunningTasks().keySet();
}
代码示例来源:origin: com.n3twork.druid/druid-indexing-service
@JsonProperty("runningTasks")
public Collection<String> getRunningTaskIds()
{
return getRunningTasks().keySet();
}
代码示例来源:origin: io.druid/druid-indexing-service
@JsonProperty("availabilityGroups")
public Set<String> getAvailabilityGroups()
{
Set<String> retVal = Sets.newHashSet();
for (TaskAnnouncement taskAnnouncement : getRunningTasks().values()) {
retVal.add(taskAnnouncement.getTaskResource().getAvailabilityGroup());
}
return retVal;
}
代码示例来源:origin: com.n3twork.druid/druid-indexing-service
@JsonProperty("availabilityGroups")
public Set<String> getAvailabilityGroups()
{
Set<String> retVal = Sets.newHashSet();
for (TaskAnnouncement taskAnnouncement : getRunningTasks().values()) {
retVal.add(taskAnnouncement.getTaskResource().getAvailabilityGroup());
}
return retVal;
}
代码示例来源:origin: com.n3twork.druid/druid-indexing-service
@JsonProperty("currCapacityUsed")
public int getCurrCapacityUsed()
{
int currCapacity = 0;
for (TaskAnnouncement taskAnnouncement : getRunningTasks().values()) {
currCapacity += taskAnnouncement.getTaskResource().getRequiredCapacity();
}
return currCapacity;
}
代码示例来源:origin: io.druid/druid-indexing-service
@JsonProperty("currCapacityUsed")
public int getCurrCapacityUsed()
{
int currCapacity = 0;
for (TaskAnnouncement taskAnnouncement : getRunningTasks().values()) {
currCapacity += taskAnnouncement.getTaskResource().getRequiredCapacity();
}
return currCapacity;
}
代码示例来源:origin: com.n3twork.druid/druid-indexing-service
@Override
public boolean apply(ZkWorker worker)
{
final boolean itHasBeenAWhile = System.currentTimeMillis() - worker.getLastCompletedTaskTime().getMillis()
>= config.getWorkerIdleTimeout().toStandardDuration().getMillis();
return worker.getRunningTasks().isEmpty() && (itHasBeenAWhile || !isValidWorker.apply(worker));
}
};
代码示例来源:origin: io.druid/druid-indexing-service
/**
* A task will be run only if there is no current knowledge in the RemoteTaskRunner of the task.
*
* @param task task to run
*/
@Override
public ListenableFuture<TaskStatus> run(final Task task)
{
final RemoteTaskRunnerWorkItem completeTask, runningTask, pendingTask;
if ((pendingTask = pendingTasks.get(task.getId())) != null) {
log.info("Assigned a task[%s] that is already pending, not doing anything", task.getId());
return pendingTask.getResult();
} else if ((runningTask = runningTasks.get(task.getId())) != null) {
ZkWorker zkWorker = findWorkerRunningTask(task.getId());
if (zkWorker == null) {
log.warn("Told to run task[%s], but no worker has started running it yet.", task.getId());
} else {
log.info("Task[%s] already running on %s.", task.getId(), zkWorker.getWorker().getHost());
TaskAnnouncement announcement = zkWorker.getRunningTasks().get(task.getId());
if (announcement.getTaskStatus().isComplete()) {
taskComplete(runningTask, zkWorker, announcement.getTaskStatus());
}
}
return runningTask.getResult();
} else if ((completeTask = completeTasks.get(task.getId())) != null) {
return completeTask.getResult();
} else {
return addPendingTask(task).getResult();
}
}
代码示例来源:origin: com.n3twork.druid/druid-indexing-service
/**
* A task will be run only if there is no current knowledge in the RemoteTaskRunner of the task.
*
* @param task task to run
*/
@Override
public ListenableFuture<TaskStatus> run(final Task task)
{
final RemoteTaskRunnerWorkItem completeTask, runningTask, pendingTask;
if ((pendingTask = pendingTasks.get(task.getId())) != null) {
log.info("Assigned a task[%s] that is already pending, not doing anything", task.getId());
return pendingTask.getResult();
} else if ((runningTask = runningTasks.get(task.getId())) != null) {
ZkWorker zkWorker = findWorkerRunningTask(task.getId());
if (zkWorker == null) {
log.warn("Told to run task[%s], but no worker has started running it yet.", task.getId());
} else {
log.info("Task[%s] already running on %s.", task.getId(), zkWorker.getWorker().getHost());
TaskAnnouncement announcement = zkWorker.getRunningTasks().get(task.getId());
if (announcement.getTaskStatus().isComplete()) {
taskComplete(runningTask, zkWorker, announcement.getTaskStatus());
}
}
return runningTask.getResult();
} else if ((completeTask = completeTasks.get(task.getId())) != null) {
return completeTask.getResult();
} else {
return addPendingTask(task).getResult();
}
}
本文整理了Java中io.druid.indexing.overlord.ZkWorker.getCurrCapacityUsed()方法的一些代码示例,展示了ZkWorker.getCurrCapa
本文整理了Java中io.druid.indexing.overlord.ZkWorker.getWorker()方法的一些代码示例,展示了ZkWorker.getWorker()的具体用法。这些代码
本文整理了Java中io.druid.indexing.overlord.ZkWorker.setLastCompletedTaskTime()方法的一些代码示例,展示了ZkWorker.setLas
本文整理了Java中io.druid.indexing.overlord.ZkWorker.start()方法的一些代码示例,展示了ZkWorker.start()的具体用法。这些代码示例主要来源于G
本文整理了Java中io.druid.indexing.overlord.ZkWorker.getAvailabilityGroups()方法的一些代码示例,展示了ZkWorker.getAvaila
本文整理了Java中io.druid.indexing.overlord.ZkWorker.()方法的一些代码示例,展示了ZkWorker.()的具体用法。这些代码示例主要来源于Github/Stac
本文整理了Java中io.druid.indexing.overlord.ZkWorker.getRunningTasks()方法的一些代码示例,展示了ZkWorker.getRunningTasks
本文整理了Java中io.druid.indexing.overlord.ZkWorker.isRunningTask()方法的一些代码示例,展示了ZkWorker.isRunningTask()的具
本文整理了Java中io.druid.indexing.overlord.ZkWorker.close()方法的一些代码示例,展示了ZkWorker.close()的具体用法。这些代码示例主要来源于G
本文整理了Java中io.druid.indexing.overlord.ZkWorker.addListener()方法的一些代码示例,展示了ZkWorker.addListener()的具体用法。
本文整理了Java中org.apache.druid.indexing.overlord.ZkWorker.getContinuouslyFailedTasksCount()方法的一些代码示例,展示了
我是一名优秀的程序员,十分优秀!