Examples of AppState


Examples of com.sparc.knappsack.enums.AppState

        checkRequiredEntity(applicationService, applicationId);

        if (appState == null || appState.isEmpty()) {
            return applicationVersionService.getApplicationVersionModels(applicationId, ApplicationVersion.class, AppState.values());
        } else {
            AppState state = AppState.valueOf(appState);
            return applicationVersionService.getApplicationVersionModels(applicationId, ApplicationVersion.class, state);
        }
    }
View Full Code Here

Examples of com.sparc.knappsack.enums.AppState

                if (currentApplicationVersion != null) {
                    editing = true;
                }

                // Check what the current AppState of the applicationVersion is if the version already exists and is being edited.
                AppState currentAppState = determineCurrentAppState(currentApplicationVersion);

                // Make a copy of the original requested AppState in case the application version is to be resigned.
                AppState requestedAppState = applicationVersionForm.getAppState();

                Domain parentDomain = parentApplication.getOwnedGroup();

                // Only continue if the parent domain exists.
                if (parentDomain != null) {
View Full Code Here

Examples of com.sparc.knappsack.enums.AppState

        return success;
    }

    private AppState determineCurrentAppState(ApplicationVersion applicationVersion) {
        AppState currentAppState = null;
        if (applicationVersion != null) {
            currentAppState = applicationVersion.getAppState();
        }

        return currentAppState;
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState

        ClientResponse response =
            this
              .constructWebResource("apps", app.getApplicationId().toString(),
                "state").accept(mediaType).get(ClientResponse.class);
        AppState targetState =
            new AppState(YarnApplicationState.KILLED.toString());

        Object entity;
        if (contentType == MediaType.APPLICATION_JSON_TYPE) {
          entity = appStateToJSON(targetState);
        } else {
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState

      for (MediaType contentType : contentTypes) {
        for (String targetStateString : targetStates) {
          RMApp app = rm.submitApp(CONTAINER_MB, "", webserviceUserName);
          amNodeManager.nodeHeartbeat(true);
          ClientResponse response;
          AppState targetState = new AppState(targetStateString);
          Object entity;
          if (contentType == MediaType.APPLICATION_JSON_TYPE) {
            entity = appStateToJSON(targetState);
          } else {
            entity = targetState;
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState

      amNodeManager.nodeHeartbeat(true);
      ClientResponse response =
          this
            .constructWebResource("apps", app.getApplicationId().toString(),
              "state").accept(mediaType).get(ClientResponse.class);
      AppState info = response.getEntity(AppState.class);
      info.setState(YarnApplicationState.KILLED.toString());

      response =
          this
            .constructWebResource("apps", app.getApplicationId().toString(),
              "state").accept(mediaType)
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState

    rm.start();
    MockNM amNodeManager = rm.registerNode("127.0.0.1:1234", 2048);
    amNodeManager.nodeHeartbeat(true);
    String[] testAppIds = { "application_1391705042196_0001", "random_string" };
    for (String testAppId : testAppIds) {
      AppState info = new AppState("KILLED");
      ClientResponse response =
          this.constructWebResource("apps", testAppId, "state")
            .accept(MediaType.APPLICATION_XML)
            .entity(info, MediaType.APPLICATION_XML).put(ClientResponse.class);
      if (!isAuthenticationEnabled()) {
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState

        "UNKNOWN", "RMWebService",
        "Trying to get state of an absent application " + appId);
      throw e;
    }

    AppState ret = new AppState();
    ret.setState(app.getState().toString());

    return ret;
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState

      throw new BadRequestException("Only '"
          + YarnApplicationState.KILLED.toString()
          + "' is allowed as a target state.");
    }

    AppState ret = new AppState();
    ret.setState(app.getState().toString());

    return Response.status(Status.OK).entity(ret).build();
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppState

      } else {
        throw ue;
      }
    }

    AppState ret = new AppState();
    ret.setState(app.getState().toString());

    if (resp.getIsKillCompleted()) {
      RMAuditLogger.logSuccess(userName, AuditConstants.KILL_APP_REQUEST,
        "RMWebService", app.getApplicationId());
    } else {
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.