Package org.apache.hadoop.yarn.exceptions

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


                // The shuffle service needs to be able to work with the host:port information provided by the AM
                // (i.e. shuffle services which require custom location / other configuration are not supported)
                serviceData.put(shuffleProvider, ByteBuffer.allocate(0));
          }
          else {
            throw new YarnRuntimeException("ShuffleProvider Service: " + shuffleProvider +
            " was NOT found in the list of aux-services that are available in this NM." +
            " You may need to specify this ShuffleProvider as an aux-service in your yarn-site.xml");
          }
        }
      }

      MRApps.addToEnvironment(
          environment, 
          Environment.CLASSPATH.name(),
          getInitialClasspath(conf), conf);

      if (initialAppClasspath != null) {
        MRApps.addToEnvironment(
            environment, 
            Environment.APP_CLASSPATH.name(),
            initialAppClasspath, conf);
      }
    } catch (IOException e) {
      throw new YarnRuntimeException(e);
    }

    // Shell
    environment.put(
        Environment.SHELL.name(),
View Full Code Here


    case NEW:
      return TaskAttemptState.NEW;
    case SUCCEEDED:
      return TaskAttemptState.SUCCEEDED;
    default:
      throw new YarnRuntimeException("Attempt to convert invalid "
          + "stateMachineTaskAttemptState to externalTaskAttemptState: "
          + smState);
    }
  }
View Full Code Here

    when(mockContext.getApplicationID()).thenReturn(attemptid.getApplicationId());
    when(mockContext.getApplicationAttemptId()).thenReturn(attemptid);
    when(mockContext.getEventHandler()).thenReturn(waitForItHandler);
    when(mockContext.getClock()).thenReturn(mockClock);
   
    doThrow(new YarnRuntimeException("Intentional Failure")).when(mockCommitter)
      .commitJob(any(JobContext.class));
   
    handler.init(conf);
    handler.start();
    try {
View Full Code Here

          null, new JobTokenSecretManager(), new Credentials(), null, null,
          mrAppMetrics, null, true, null, 0, null, null, null, null);
    InitTransition initTransition = new InitTransition() {
        @Override
        protected TaskSplitMetaInfo[] createSplits(JobImpl job, JobId jobId) {
          throw new YarnRuntimeException(EXCEPTIONMSG);
        }
      };
    JobEvent mockJobEvent = mock(JobEvent.class);

    JobStateInternal jobSI = initTransition.transition(job, mockJobEvent);
View Full Code Here

        allTaskSplitMetaInfo = SplitMetaInfoReader.readSplitMetaInfo(
            job.oldJobId, job.fs,
            job.conf,
            job.remoteJobSubmitDir);
      } catch (IOException e) {
        throw new YarnRuntimeException(e);
      }
      return allTaskSplitMetaInfo;
    }
View Full Code Here

      testAbsPath = new Path(testWorkDir.getAbsolutePath());
      try {
        FileContext.getLocalFSFileContext().delete(testAbsPath, true);
      } catch (Exception e) {
        LOG.warn("COULD NOT CLEANUP: " + testAbsPath, e);
        throw new YarnRuntimeException("could not cleanup test dir", e);
      }
    }

    this.maps = maps;
    this.reduces = reduces;
View Full Code Here

      String user = UserGroupInformation.getCurrentUser().getShortUserName();
      Path stagingDir = MRApps.getStagingAreaDir(conf, user);
      FileSystem fs = getFileSystem(conf);
      fs.mkdirs(stagingDir);
    } catch (Exception e) {
      throw new YarnRuntimeException("Error creating staging dir", e);
    }
   
    super.serviceInit(conf);
    if (this.clusterInfo != null) {
      getContext().getClusterInfo().setMaxContainerCapability(
View Full Code Here

      String diagnostic) {
    UserGroupInformation currentUser = null;
    try {
      currentUser = UserGroupInformation.getCurrentUser();
    } catch (IOException e) {
      throw new YarnRuntimeException(e);
    }
    Job newJob = new TestJob(getJobId(), getAttemptID(), conf,
        getDispatcher().getEventHandler(),
            getTaskAttemptListener(), getContext().getClock(),
            getCommitter(), isNewApiCommitter(),
View Full Code Here

        String diagnostic) {
      UserGroupInformation currentUser = null;
      try {
        currentUser = UserGroupInformation.getCurrentUser();
      } catch (IOException e) {
        throw new YarnRuntimeException(e);
      }
      Job newJob = new TestJob(getJobId(), getAttemptID(), conf,
          getDispatcher().getEventHandler(),
          getTaskAttemptListener(), getContext().getClock(),
          getCommitter(), isNewApiCommitter(),
View Full Code Here


  public RoleStatus lookupRoleStatus(String name) throws YarnRuntimeException {
    ProviderRole providerRole = roles.get(name);
    if (providerRole == null) {
      throw new YarnRuntimeException("Unknown role " + name);
    }
    return lookupRoleStatus(providerRole.id);
  }
View Full Code Here

TOP

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

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.