Package org.apache.slider.core.exceptions

Examples of org.apache.slider.core.exceptions.SliderException


  public URL asURL() throws SliderException {
    verifyEndpointType(TYPE_URL);
    try {
      return new URL(value);
    } catch (MalformedURLException e) {
      throw new SliderException(-1, e,
          "could not create a URL from %s : %s", value, e.toString());
    }
  }
View Full Code Here


   * @param desiredType desired type
   * @throws SliderException if it is not
   */
  public void verifyEndpointType(String desiredType) throws SliderException {
    if (!type.equals(desiredType)) {
      throw new SliderException(-1, "Body of endpoint is of type %s and not %s",
          type, desiredType);
    }
  }
View Full Code Here

        break;
      case SliderActions.ACTION_CREATE:
        exitCode = createAndRunCluster(actionArgs.get(0));
        break;
      default:
        throw new SliderException("Unimplemented: " + action);
    }
    log.info("Exiting AM; final exit code = {}", exitCode);
    return exitCode;
  }
View Full Code Here

      synchronized (syncLock) {
        if (metainfo == null) {
          metainfo = getApplicationMetainfo(fileSystem, appDef);
          if (metainfo == null || metainfo.getServices() == null || metainfo.getServices().size() == 0) {
            log.error("metainfo.xml is unavailable or malformed at {}.", appDef);
            throw new SliderException("metainfo.xml is required in app package.");
          }

          commandOrder = new ComponentCommandOrder(metainfo.getServices().get(0).getCommandOrder());
        }
      }
View Full Code Here

        break;
      case ACTION_VERSION:
        exitCode = actionVersion();
        break;
      default:
        throw new SliderException(EXIT_UNIMPLEMENTED,
            "Unimplemented: " + action);
    }

    return exitCode;
  }
View Full Code Here

    List<ApplicationReport> instances = findAllLiveInstances(clustername);
    // detect any race leading to cluster creation during the check/destroy process
    // and report a problem.
    if (!instances.isEmpty()) {
      throw new SliderException(EXIT_APPLICATION_IN_USE,
                              clustername + ": "
                              + E_DESTROY_CREATE_RACE_CONDITION
                              + " :" +
                              instances.get(0));
    }
View Full Code Here

                                                       IOException,
                                                       YarnException {
    List<ApplicationReport> existing = findAllLiveInstances(clustername);

    if (!existing.isEmpty()) {
      throw new SliderException(EXIT_APPLICATION_IN_USE,
                              clustername + ": " + E_CLUSTER_RUNNING + " :" +
                              existing.get(0));
    }
  }
View Full Code Here

                                yarnClient.getRmClient(),
                                app,
                                Constants.CONNECT_TIMEOUT,
                                Constants.RPC_TIMEOUT);
    } catch (InterruptedException e) {
      throw new SliderException(SliderExitCodes.EXIT_TIMED_OUT,
                              e,
                              "Interrupted waiting for communications with the Slider AM");
    }
  }
View Full Code Here

      tags.add("Name: " + service.getName());
      tags.add("Version: " + service.getVersion());
      tags.add("Description: " + SliderUtils.truncate(service.getComment(), 80));
    } catch (IOException e) {
      log.error("error retrieving metainfo from {}", appDef, e);
      throw new SliderException("error retrieving metainfo", e);
    }

    return tags;
  }
View Full Code Here

          initializeAgentDebugCommands(instanceDefinition);

          metainfo = getApplicationMetainfo(fileSystem, appDef);
          if (metainfo == null || metainfo.getApplication() == null) {
            log.error("metainfo.xml is unavailable or malformed at {}.", appDef);
            throw new SliderException("metainfo.xml is required in app package.");
          }

          commandOrder = new ComponentCommandOrder(metainfo.getApplication().getCommandOrder());
          monitor = new HeartbeatMonitor(this, getHeartbeatMonitorInterval());
          monitor.start();
View Full Code Here

TOP

Related Classes of org.apache.slider.core.exceptions.SliderException

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.