Package org.apache.ambari.server.controller.spi

Examples of org.apache.ambari.server.controller.spi.SystemException


      } catch (org.apache.ambari.view.UnsupportedPropertyException e) {
        throw new UnsupportedPropertyException(getResourceType(e), e.getPropertyIds());
      } catch (org.apache.ambari.view.ResourceAlreadyExistsException e) {
        throw new ResourceAlreadyExistsException(e.getMessage());
      } catch (Exception e) {
        throw new SystemException(e.getMessage(), e);
      }
    }
    return new RequestStatusImpl(null);
  }
View Full Code Here


    } catch (org.apache.ambari.view.NoSuchResourceException e) {
      throw new NoSuchParentResourceException(e.getMessage(), e);
    } catch (org.apache.ambari.view.UnsupportedPropertyException e) {
      throw new UnsupportedPropertyException(getResourceType(e), e.getPropertyIds());
    } catch (Exception e) {
      throw new SystemException(e.getMessage(), e);
    }
  }
View Full Code Here

        } catch (org.apache.ambari.view.NoSuchResourceException e) {
          throw new NoSuchParentResourceException(e.getMessage(), e);
        } catch (org.apache.ambari.view.UnsupportedPropertyException e) {
          throw new UnsupportedPropertyException(getResourceType(e), e.getPropertyIds());
        } catch (Exception e) {
          throw new SystemException(e.getMessage(), e);
        }
      }
    }
    return new RequestStatusImpl(null);
  }
View Full Code Here

      } catch (org.apache.ambari.view.NoSuchResourceException e) {
        throw new NoSuchParentResourceException(e.getMessage(), e);
      } catch (org.apache.ambari.view.UnsupportedPropertyException e) {
        throw new UnsupportedPropertyException(getResourceType(e), e.getPropertyIds());
      } catch (Exception e) {
        throw new SystemException(e.getMessage(), e);
      }
    }
    return new RequestStatusImpl(null);
  }
View Full Code Here

      if (hostname.equalsIgnoreCase("localhost")) {
        return InetAddress.getLocalHost().getCanonicalHostName();
      }
      return InetAddress.getByName(hostname).getCanonicalHostName();
    } catch (Exception e) {
      throw new SystemException("Error getting hostname.", e);
    }
  }
View Full Code Here

      if (hostname.equalsIgnoreCase("localhost")) {
        return InetAddress.getLocalHost().getHostAddress();
      }
      return InetAddress.getByName(hostname).getHostAddress();
    } catch (Exception e) {
      throw new SystemException("Error getting ip address.", e);
    }
  }
View Full Code Here

      notifyUpdate(Resource.Type.Service, startRequest, startPredicate);
      requestStages.persist();
      return requestStages.getRequestStatusResponse();

    } catch (NoSuchResourceException e) {
      throw new SystemException("Attempted to modify a non-existing service",  e);
    }
  }
View Full Code Here

      try {
        //todo: properly handle non system exceptions
        setConfigurationsOnCluster(clusterName, type, entry.getValue());
      } catch (AmbariException e) {
        throw new SystemException("Unable to set configurations on cluster.", e);
      }
    }
  }
View Full Code Here

      throw new IllegalArgumentException("Invalid stack information provided for cluster.  " +
          "stack name: " + blueprint.getStackName() +
          " stack version: " + blueprint.getStackVersion());
    } catch (AmbariException e) {
      //todo: review all exception handling associated with cluster creation via blueprint
      throw new SystemException("Unable to obtain stack information.", e);
    }
    return stack;
  }
View Full Code Here

  private void persistInstallStateForUI() throws SystemException {
    PersistKeyValueService persistService = new PersistKeyValueService();
    try {
      persistService.update("{\"CLUSTER_CURRENT_STATUS\": \"{\\\"clusterState\\\":\\\"CLUSTER_STARTED_5\\\"}\"}");
    } catch (Exception e) {
      throw new SystemException("Unable to finalize state of cluster for UI.  " +
          "Cluster creation will not be affected but the cluster may be inaccessible by Ambari UI." );
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.controller.spi.SystemException

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.