Package org.apache.hadoop.yarn.exceptions

Examples of org.apache.hadoop.yarn.exceptions.YarnException


      throws YarnException, InterruptedException {
    GetClusterMetricsRequest req = GetClusterMetricsRequest.newInstance();
    for (int i = 0; i < timeout / 100; i++) {
      ResourceManager rm = getResourceManager();
      if (rm == null) {
        throw new YarnException("Can not find the active RM.");
      }
      else if (nodeManagers.length == rm.getClientRMService()
            .getClusterMetrics(req).getClusterMetrics().getNumNodeManagers()) {
        return true;
      }
View Full Code Here


  @Override
  public synchronized InputStream getConfigurationInputStream(
      Configuration bootstrapConf, String name) throws IOException,
      YarnException {
    if (name == null || name.isEmpty()) {
      throw new YarnException(
          "Illegal argument! The parameter should not be null or empty");
    }
    Path filePath;
    if (YarnConfiguration.RM_CONFIGURATION_FILES.contains(name)) {
      filePath = new Path(this.configDir, name);
View Full Code Here

  @Override
  public InputStream getConfigurationInputStream(Configuration bootstrapConf,
      String name) throws IOException, YarnException {
    if (name == null || name.isEmpty()) {
      throw new YarnException(
          "Illegal argument! The parameter should not be null or empty");
    } else if (YarnConfiguration.RM_CONFIGURATION_FILES.contains(name)) {
      return bootstrapConf.getConfResourceAsInputStream(name);
    }
    return new FileInputStream(name);
View Full Code Here

        // TODO launchedContainer misplaced -> doesn't necessarily mean a container
        // launch. A finished Application will not launch containers.
        metrics.launchedContainer();
        metrics.allocateContainer(containerTokenIdentifier.getResource());
      } else {
        throw new YarnException(
            "Container start failed as the NodeManager is " +
            "in the process of shutting down");
      }
    } finally {
      this.readLock.unlock();
View Full Code Here

      }

      @Override
      protected void doUnregistration()
          throws YarnException, IOException, InterruptedException {
        throw new YarnException("test exception");
      }
View Full Code Here

    if (durationToTrackStoppedContainers < 0) {
      String message = "Invalid configuration for "
        + YARN_NODEMANAGER_DURATION_TO_TRACK_STOPPED_CONTAINERS + " default "
          + "value is 10Min(600000).";
      LOG.error(message);
      throw new YarnException(message);
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug(YARN_NODEMANAGER_DURATION_TO_TRACK_STOPPED_CONTAINERS + " :"
        + durationToTrackStoppedContainers);
    }
View Full Code Here

  public static class FifoSchedulerWithMove extends FifoScheduler {
    @Override
    public String moveApplication(ApplicationId appId, String newQueue)
        throws YarnException {
      if (failMove) {
        throw new YarnException("Move not supported");
      }
      return newQueue;
    }
View Full Code Here

    List<File> containerLogDirs = new ArrayList<File>(logDirs.size());
    for (String logDir : logDirs) {
      try {
        logDir = new URI(logDir).getPath();
      } catch (URISyntaxException e) {
        throw new YarnException("Internal error", e);
      }
      String appIdStr = ConverterUtils.toString(containerId
          .getApplicationAttemptId().getApplicationId());
      File appLogDir = new File(logDir, appIdStr);
      containerLogDirs.add(new File(appLogDir, containerId.toString()));
View Full Code Here

          relativeContainerLogDir + Path.SEPARATOR + fileName);
      URI logPathURI = new URI(logPath.toString());
      File logFile = new File(logPathURI.getPath());
      return logFile;
    } catch (URISyntaxException e) {
      throw new YarnException("Internal error", e);
    } catch (IOException e) {
      LOG.warn("Failed to find log file", e);
      throw new NotFoundException("Cannot find this log on the local disk.");
    }
  }
View Full Code Here

    }
    if (callerUGI != null
        && !context.getApplicationACLsManager().checkAccess(callerUGI,
            ApplicationAccessType.VIEW_APP, application.getUser(),
            application.getAppId())) {
      throw new YarnException(
          "User [" + remoteUser
              + "] is not authorized to view the logs for application "
              + application.getAppId());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.exceptions.YarnException

Copyright © 2018 www.massapicom. 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.