Package io.fabric8.api

Examples of io.fabric8.api.FabricException


                        unregisterPort(container, pid);
                    }
                    deleteSafe(curator.get(), containerPortsPath);
                }
            } else {
                throw new FabricException("Could not acquire port lock");
            }
        } catch (Exception ex) {
            throw FabricException.launderThrowable(ex);
        } finally {
            releaseLock();
View Full Code Here


                            }
                        }
                    }
                }
            } else {
                throw new FabricException("Could not acquire port lock");
            }
        } catch (Exception ex) {
            throw FabricException.launderThrowable(ex);
        } finally {
            releaseLock();
View Full Code Here

                            //ignore
                        }
                    }
                }
            } else {
                throw new FabricException("Could not acquire port lock");
            }
        } catch (Exception ex) {
            throw FabricException.launderThrowable(ex);
        } finally {
            releaseLock();
View Full Code Here

            sb.append("Profile has assigned ").append(containers.length).append(" container(s):");
            for (Container c : containers) {
                sb.append(" ").append(c.getId());
            }
            sb.append(". Use force option to also remove the profile from the containers.");
            throw new FabricException(sb.toString());
        }

        // lets remove any pending requirements on this profile
        FabricRequirements requirements = fabricService != null ? fabricService.getRequirements() : null;
        if (requirements != null && requirements.removeProfileRequirements(profileId)) {
            try {
                fabricService.setRequirements(requirements);
            } catch (IOException e) {
                throw new FabricException("Failed to update requirements after deleting profile " + profileId + ". " + e, e);
            }
        }
    }
View Full Code Here

                createHandler.waitForSuccessfulDeploymentOf(name, syscontext, bootstrapTimeout - (currentTime - startTime));
            }
        } catch (RuntimeException rte) {
            throw rte;
        } catch (Exception ex) {
            throw new FabricException("Unable to create zookeeper server configuration", ex);
        }
    }
View Full Code Here

        } catch (RuntimeException rte) {
            throw rte;
        } catch (TimeoutException toe) {
            throw toe;
        } catch (Exception ex) {
            throw new FabricException("Unable to delete zookeeper configuration", ex);
        } finally {
            LOGGER.debug("End clean fabric");
        }
    }
View Full Code Here

        if (allMetadata != null && allMetadata.length > 0) {
            for (CreateContainerMetadata metadata : allMetadata) {
                Container container = metadata.getContainer();
                containers.add(ContainerProxy.wrap(container, fabricServiceProxy));
                if (!metadata.isSuccess()) {
                    throw new FabricException("Failed to create container." , metadata.getFailure());
                }
            }
        }

        return containers;
View Full Code Here

    int bounds = 100;
    int column = 0;
    Function1 function = new Function1() {
      @Override
      public Object apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getProfile();
        }
        return null;
      }
    };
    column = addColumnFunction(250, column, function, "Profile");
    function = new FunctionInteger() {
      @Override
      public Integer apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getCount();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Count");
    function = new FunctionInteger() {
      @Override
      public Integer apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getMinimumInstances();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Minumum");
    function = new FunctionInteger() {
      @Override
      public Integer apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getMaximumInstances();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Maximum");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return toHealth(status);
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Status",
        new HealthLabelProvider(function));
    function = new Function1() {
      @Override
      public Double apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getHealth(status.getCount());
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Health",
        new PercentFunctionLabelProvider(function));
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getDependentProfiles();
        }
        return null;
      }
    };
    column = addColumnFunction(250, column, function, "Dependencies");
View Full Code Here

    int bounds = 100;
    int column = 0;
    Function1 function = new Function1() {
      @Override
      public Object apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getProfile();
        }
        return null;
      }
    };
    column = addColumnFunction(250, column, function, "Profile");
    function = new FunctionInteger() {
      @Override
      public Integer apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getCount();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Count");
    function = new FunctionInteger() {
      @Override
      public Integer apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getMinimumInstances();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Minumum");
    function = new FunctionInteger() {
      @Override
      public Integer apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getMaximumInstances();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Maximum");
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return toHealth(status);
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Status",
        new HealthLabelProvider(function));
    function = new Function1() {
      @Override
      public Double apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getHealth(status.getCount());
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Health",
        new PercentFunctionLabelProvider(function));
    function = new Function1() {
      @Override
      public Object apply(Object element) {
        ProfileStatus status = asProfileStatus(element);
        if (status != null) {
          return status.getDependentProfiles();
        }
        return null;
      }
    };
    column = addColumnFunction(250, column, function, "Dependencies");
View Full Code Here

  protected Set<String> getSelectedVersionNames() {
    Set<String> answer = new HashSet<String>();
    List<Container> containers = getSelectedContainers();
    for (Container container : containers) {
      Version version = container.getVersion();
      if (version != null) {
        String name = version.getId();
        if (name != null) {
          answer.add(name);
        }
      }
    }
View Full Code Here

TOP

Related Classes of io.fabric8.api.FabricException

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.