Package org.jclouds.compute

Examples of org.jclouds.compute.RunNodesException


      }
      Function<NodeMetadata, NodeMetadata> fn = persistNodeCredentials.always(template.getOptions().getRunScript());
      badNodes = Maps2.transformKeys(badNodes, fn);
      goodNodes = ImmutableSet.copyOf(Iterables.transform(goodNodes, fn));
      if (executionExceptions.size() > 0 || badNodes.size() > 0) {
         throw new RunNodesException(group, count, template, goodNodes, executionExceptions, badNodes);
      }
      return goodNodes;
   }
View Full Code Here


    when(node1.getPublicAddresses()).thenReturn(Collections.singleton("1.1.1.1"));
    when(node2.getHostname()).thenReturn("node2");
    when(node2.getPublicAddresses()).thenReturn(Collections.singleton("1.1.1.2"));
    when(node3.getHostname()).thenReturn("node3");
    when(node3.getPublicAddresses()).thenReturn(Collections.singleton("1.1.1.3"));
    runNodesException = new RunNodesException("", 2, template,
        Collections.singleton(node1), Collections.<String, Exception>emptyMap(),
        Collections.singletonMap(node2, new Exception("For testing")));
  }
View Full Code Here

      }
      Function<NodeMetadata, NodeMetadata> fn = persistNodeCredentials.always(template.getOptions().getRunScript());
      badNodes = Maps2.transformKeys(badNodes, fn);
      goodNodes = ImmutableSet.copyOf(Iterables.transform(goodNodes, fn));
      if (executionExceptions.size() > 0 || badNodes.size() > 0) {
         throw new RunNodesException(group, count, template, goodNodes, executionExceptions, badNodes);
      }
      return goodNodes;
   }
View Full Code Here

            userMetadata, new OperatingSystem(null, null, null, null, "op", true), "description",
            null, null, loginCredentials);
        Hardware hardware = new HardwareImpl("ec2", "test", "testId", location, new URI("http://node"),
                userMetadata, new ArrayList<Processor>(), 1, new ArrayList<Volume>(), null);
        Template template = new TemplateImpl(image, hardware, location, TemplateOptions.NONE);
        throw new RunNodesException("tag" + id, num, template, nodes, executionExceptions, failedNodes);
      }
      return nodes;
    }
View Full Code Here

        successfulNodes.addAll(nodes);
      } catch (ExecutionException e) {
        // checking RunNodesException and collect the outcome
        Throwable th = e.getCause();
        if (th instanceof RunNodesException) {
          RunNodesException rnex = (RunNodesException) th;
          successfulNodes.addAll(rnex.getSuccessfulNodes());
          lostNodes.putAll(rnex.getNodeErrors());
        } else {
          LOG.error("Unexpected error while starting " + numberOfNodes + " nodes, minimum "
              + minNumberOfNodes + " nodes for " + roles + " of cluster " + clusterName, e);
        }
      }
View Full Code Here

    when(template.getImage()).thenReturn(mock(Image.class));
    when(template.getHardware()).thenReturn(mock(Hardware.class));
    when(node1.getHostname()).thenReturn("node1");
    when(node2.getHostname()).thenReturn("node2");
    when(node3.getHostname()).thenReturn("node3");
    runNodesException = new RunNodesException("", 2, template,
        Collections.singleton(node1), Collections.<String, Exception>emptyMap(),
        Collections.singletonMap(node2, new Exception("For testing")));
  }
View Full Code Here

      }
      Function<NodeMetadata, NodeMetadata> fn = persistNodeCredentials.always(template.getOptions().getRunScript());
      badNodes = Maps2.transformKeys(badNodes, fn);
      goodNodes = ImmutableSet.copyOf(Iterables.transform(goodNodes, fn));
      if (executionExceptions.size() > 0 || badNodes.size() > 0) {
         throw new RunNodesException(group, count, template, goodNodes, executionExceptions, badNodes);
      }
      return goodNodes;
   }
View Full Code Here

      }
      Function<NodeMetadata, NodeMetadata> fn = persistNodeCredentials.always(template.getOptions().getRunScript());
      badNodes = Maps2.transformKeys(badNodes, fn);
      goodNodes = ImmutableSet.copyOf(Iterables.transform(goodNodes, fn));
      if (!executionExceptions.isEmpty() || !badNodes.isEmpty()) {
         throw new RunNodesException(group, count, template, goodNodes, executionExceptions, badNodes);
      }
      return goodNodes;
   }
View Full Code Here

TOP

Related Classes of org.jclouds.compute.RunNodesException

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.