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

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


      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


          }
        });
       
        return alerts.alerts;
      } catch (Exception e) {
        throw new SystemException("Error reading HTTP response for cluster " + clusterName +
            ", nagios=" + url + " (" + e.getMessage() + ")", e);
      } finally {
        if (in != null) {
          try {
            in.close();
View Full Code Here

      } 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

      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

    String clusterName = (String) resource.getPropertyValue(clusterNamePropertyId);

    String port = getPort(clusterName, componentName);
    if (port == null) {
      throw new SystemException(
          "Unable to get JMX metrics.  No port value for " + componentName, null);
    }

    String hostName = getHost(resource, clusterName, componentName);
    if (hostName == null) {
      throw new SystemException(
          "Unable to get JMX metrics.  No host name for " + componentName, null);
    }
   
    String protocol = getJMXProtocol(clusterName, componentName);
    try {
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.