Examples of DuccNode


Examples of org.apache.uima.ducc.common.DuccNode

              new NodeMetrics(agent.getIdentity(), nmiFuture.get(), loadFuture.get(),
                      cpuFuture.get(), nuiFuture.get());

      //Node node = new DuccNode(new NodeIdentity(), nodeMetrics);
      // jrc 2011-07-30 I think this needs to be agent.getIdentity(), not create a new identity.
      Node node = new DuccNode(agent.getIdentity(), nodeMetrics);
   
      // Make the agent aware how much memory is available on the node. Do this once.
    if ( agent.getNodeInfo() == null ) {
      agent.setNodeInfo(node);
    }
   
      logger.info(methodName, null, "... Agent "+node.getNodeIdentity().getName()+" Posting Users:"+
              node.getNodeMetrics().getNodeUsersMap().size());
     
      NodeMetricsUpdateDuccEvent event = new NodeMetricsUpdateDuccEvent(node,agent.getInventoryRef().size());
      exchange.getIn().setBody(event, NodeMetricsUpdateDuccEvent.class);

    } catch( Exception e) {
View Full Code Here

Examples of org.apache.uima.ducc.common.DuccNode

      }
     
            NodeMetrics nodeMetrics = new NodeMetrics(agent.getIdentity(), memInfo, loadFuture.get(),
              cpuFuture.get(), users);
     
      Node node = new DuccNode(agent.getIdentity(), nodeMetrics);
      // Make the agent aware how much memory is available on the node. Do this once.
      if ( agent.getNodeInfo() == null ) {
        agent.setNodeInfo(node);
      }
           
      ((DuccNode)node).duccLingExists(agent.duccLingExists());
      ((DuccNode)node).runWithDuccLing(agent.runWithDuccLing());
      logger.info(methodName, null, "... Agent "+node.getNodeIdentity().getName()+" Posting Memory:"
          + node.getNodeMetrics().getNodeMemory().getMemTotal()+
          " Memory Free:"+node.getNodeMetrics().getNodeMemory().getMemFree()+
          " Swap Total:"+node.getNodeMetrics().getNodeMemory().getSwapTotal()+
          " Swap Free:"+node.getNodeMetrics().getNodeMemory().getSwapFree()+
          " Low Swap Threshold Defined in ducc.properties:"+swapThreshold);
      logger.trace(methodName, null, "... Agent "+node.getNodeIdentity().getName()+" Posting Users:"+
          node.getNodeMetrics().getNodeUsersMap().size());
      // Check if swap free is less than defined minimum threshold (check ducc.properties)
      if ( swapThreshold > 0 && ( node.getNodeMetrics().getNodeMemory().getSwapFree() < swapThreshold)) {
        agent.killProcessDueToLowSwapSpace(swapThreshold);
      }
      NodeMetricsUpdateDuccEvent updateEvent = new NodeMetricsUpdateDuccEvent(node,agent.getInventoryRef().size());
      e.getIn().setBody(updateEvent, NodeMetricsUpdateDuccEvent.class);
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.