Package com.hubspot.singularity.executor.SingularityExecutorCleanupStatistics

Examples of com.hubspot.singularity.executor.SingularityExecutorCleanupStatistics.SingularityExecutorCleanupStatisticsBuilder.build()


    try {
      runningTaskIds = getRunningTaskIds();
    } catch (SingularityClientException sce) {
      LOG.error("While fetching running tasks from singularity", sce);
      statisticsBldr.setErrorMessage(sce.getMessage());
      return statisticsBldr.build();
    }

    LOG.info("Found {} running tasks from Mesos", runningTaskIds);

    statisticsBldr.setMesosRunningTasks(runningTaskIds.size());
View Full Code Here


    if (runningTaskIds.isEmpty()) {
      if (cleanupConfiguration.isSafeModeWontRunWithNoTasks()) {
        final String errorMessage = String.format("Running in safe mode (%s) and found 0 running tasks - aborting cleanup", SingularityExecutorCleanupConfigurationLoader.SAFE_MODE_WONT_RUN_WITH_NO_TASKS);
        LOG.error(errorMessage);
        statisticsBldr.setErrorMessage(errorMessage);
        return statisticsBldr.build();
      } else {
        LOG.warn("Found 0 running tasks - proceeding with cleanup as we are not in safe mode ({})", SingularityExecutorCleanupConfigurationLoader.SAFE_MODE_WONT_RUN_WITH_NO_TASKS);
      }
    }
View Full Code Here

        statisticsBldr.incrIoErrorTasks();
      }
    }

    return statisticsBldr.build();
  }

  private Collection<SingularityTask> getActiveTasksOnSlave() {
    try {
      return singularityClient.getActiveTasks(JavaUtils.getHostAddress());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.