Examples of Ip


Examples of org.apache.uima.ducc.ws.types.Ip

 
  public void put(DatedNodeMetricsUpdateDuccEvent duccEvent) {
    String location = "put";
    MachineSummaryInfo msi = new MachineSummaryInfo();
    NodeMetricsUpdateDuccEvent nodeMetrics = duccEvent.getNodeMetricsUpdateDuccEvent();
    Ip ip = new Ip(nodeMetrics.getNodeIdentity().getIp().trim());
    TreeMap<String, NodeUsersInfo> map = nodeMetrics.getNodeUsersMap();
    if(map != null) {
      ipToNodeUsersInfoMap.put(ip.toString(), map);
    }
    String machineName = nodeMetrics.getNodeIdentity().getName().trim();
    ipToNameMap.put(ip.toString(),machineName);
    nameToIpMap.put(machineName,ip.toString());
    double dval = nodeMetrics.getNodeMemory().getMemTotal();
    long lval = (long) (dval/(1024*1024)+0.5);
    msi.memoryTotal = lval;
    msi.sharesTotal = lval/shareSize;
    String memTotal = ""+lval/*+memUnits*/;
    String sharesTotal = ""+lval/shareSize;
    // swap: in-use
    double dvalT = nodeMetrics.getNodeMemory().getSwapTotal();
    long lvalT = (long) (dvalT/(1024*1024)+0.5);
    double dvalF= nodeMetrics.getNodeMemory().getSwapFree();
    long lvalF = (long) (dvalF/(1024*1024)+0.5);
    lval = lvalT - lvalF;
    String memSwap = ""+lval/*+memUnits*/;
    msi.memorySwapped = lval;
    String swapKey = ip.toString();
    String swapVal = ip.toString();
    if(msi.memorySwapped > 0) {
      isSwapping.put(swapKey, swapVal);
    }
    else {
      isSwapping.remove(swapKey);
    }
    String sharesInuse = "0";
    Properties shareMap = getShareMap(shareSize);
    try {
      if(shareMap.containsKey(ip.toString())) {
        msi.sharesInuse += (Integer)shareMap.get(ip.toString());
        sharesInuse = ""+msi.sharesInuse;
      }
    }
    catch(Throwable t) {
      logger.warn(location, jobid, t);
    }
    List<ProcessInfo> alienPids = nodeMetrics.getRogueProcessInfoList();
    MachineInfo current = new MachineInfo("", ip.toString(), machineName, memTotal, memSwap, alienPids, sharesTotal, sharesInuse, duccEvent.getMillis(), duccEvent.getEventSize());
    String key = normalizeMachineName(machineName);
    MachineInfo previous = unsortedMachines.get(key);
    if(previous != null) {
      long pHbMax = previous.getHeartbeatMax();
      long tod = previous.getHeartbeatMaxTOD();
View Full Code Here

Examples of org.jclouds.glesys.domain.Ip

      ServerDetails actual = api.get("xm3276891");
      assertEquals(actual.toString(), expectedServerDetails().toString());
   }

   public static ServerDetails expectedServerDetails() {
      Ip ip = Ip.builder().version4().ip("31.192.231.254").version4().cost(2.0).currency("EUR").build();
      Cost cost = Cost.builder().amount(10.22).currency("EUR").timePeriod("month").build();
      return ServerDetails.builder().id("vz1840356").transferGB(50).hostname("glesys-s").cpuCores(1).memorySizeMB(512)
            .diskSizeGB(5).datacenter("Falkenberg").description("glesys-s-6dd").platform("OpenVZ")
            .templateName("Ubuntu 10.04 LTS 32-bit").state(Server.State.RUNNING).cost(cost).ips(ip).build();
   }
View Full Code Here

Examples of org.jclouds.gogrid.domain.Ip

         // collision avoidance for simplicity
         Set<Ip> availableIps = client.getIpServices().getIpList(unassignedIps);
         if (availableIps.isEmpty())
            throw new RuntimeException("No IPs available on this identity.");
         int ipIndex = new SecureRandom().nextInt(availableIps.size());
         Ip availableIp = Iterables.get(availableIps, ipIndex);
         try {
            addedServer = addServer(name, template, availableIp);
            notStarted = false;
         } catch (Exception e) {
            if (--numOfRetries == 0)
View Full Code Here

Examples of org.jclouds.ibm.smartcloud.domain.IP

   @Override
   public Instance expected() {
      return Instance.builder().launchTime(new Date(1305351683883l)).software(
               ImmutableSet.of(new Software("SUSE Linux Enterprise Server", "OS", "11 SP1"))).primaryIP(
               new IP("                ", "                ", 0)).requestId("80890").keyName("adriancole").name(
               "adriancole").instanceType("COP32.1/2048/60").status(Status.NEW).owner("adrian@cloudconscious.com")
               .location("101").imageId("20015393").rootOnly(true).requestName("adriancole").id("80590")
               .expirationTime(new Date(1368423692824l)).diskSize(60).build();
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.