Package org.apache.uima.ducc.transport.event.common

Examples of org.apache.uima.ducc.transport.event.common.ProcessMemoryAssignment


  private transient LinuxProcessMetricsProcessor metricsProcessor;

  private volatile boolean isJD;

  public ManagedProcess(IDuccProcess process, ICommandLine commandLine) {
    this(process, commandLine, null, null, new ProcessMemoryAssignment());
  }
View Full Code Here


    this(process, commandLine, null, null, new ProcessMemoryAssignment());
  }

  public ManagedProcess(IDuccProcess process, ICommandLine commandLine,
      boolean agentProcess) {
    this(process, commandLine, null, null, new ProcessMemoryAssignment());
    this.agentProcess = agentProcess;
  }
View Full Code Here

          List<IDuccProcess> jobProcessList = new ArrayList<IDuccProcess>();
         
          long normalizedProcessMemoryRequirements = normalizeMemory(dcj.getSchedulingInfo().getShareMemorySize(),dcj.getSchedulingInfo().getShareMemoryUnits());
          int shares = getShares(normalizedProcessMemoryRequirements);
          long processAdjustedMemorySize = shares * shareQuantum * 1024
          ProcessMemoryAssignment pma = new ProcessMemoryAssignment();
          pma.setShares(shares);
          pma.setNormalizedMemoryInMBs(processAdjustedMemorySize);
         
     
          //  Copy job processes
          for( Entry<DuccId,IDuccProcess> jpProcess : dcj.getProcessMap().getMap().entrySet()) {
            jobProcessList.add(jpProcess.getValue());
          }
         
         
         
          if ( dcj.getUimaDeployableConfiguration() instanceof DuccUimaDeploymentDescriptor ) {
            //  Add deployment UIMA AS deployment descriptor path
            ((JavaCommandLine)dcj.getCommandLine()).
              addArgument(((DuccUimaDeploymentDescriptor)dcj.getUimaDeployableConfiguration()).getDeploymentDescriptorPath());
          }
         
         
          //  Calculate Process memory allocation including a fudge factor (if one is defined). The
          //  returned value is in terms of Megs.
//          long processAdjustedMemorySize =
//                  calculateProcessMemoryAssignment(dcj.getSchedulingInfo().getShareMemorySize(),
//                          dcj.getSchedulingInfo().getShareMemoryUnits());
          //  add fudge factor (5% default)  to adjust memory computed above
          processAdjustedMemorySize += (processAdjustedMemorySize * ((double)fudgeFactor/100));
          pma.setMaxMemoryWithFudge(processAdjustedMemorySize);
         
          logger.info(methodName,dcj.getDuccId(),"--------------- User Requested Memory For Process:"+dcj.getSchedulingInfo().getShareMemorySize()+dcj.getSchedulingInfo().getShareMemoryUnits()+" PM Calculated Memory Assignment of:"+processAdjustedMemorySize);
         
          ICommandLine driverCmdLine = null;
          IDuccProcess driverProcess = null;
View Full Code Here

      if (getInventoryRef().containsKey(process.getDuccId())) {
        logger.error(methodName, null, "Rejecting Process Start Request. Process with a Ducc ID:"
                + process.getDuccId() + " is already in agent's inventory.");
        return;
      }
      startProcess(process, commandLine, info, workDuccId, new ProcessMemoryAssignment());
    } catch (InterruptedException e) {
      logger.error(methodName, null, e);
    } finally {
      inventorySemaphore.release();
    }
View Full Code Here

                + process.getPID()
                + " Not in Agent's inventory. Adding to the inventory with state=Stopped");
        process.setProcessState(ProcessState.Stopped);
        inventory.put(process.getDuccId(), process);
        deployedProcesses.add(new ManagedProcess(process, null, this, logger,
                new ProcessMemoryAssignment()));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.common.ProcessMemoryAssignment

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.