You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by de...@apache.org on 2015/09/09 21:19:20 UTC
svn commit: r1702091 [1/2] - in
/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main:
java/org/apache/uima/ducc/ws/ java/org/apache/uima/ducc/ws/registry/sort/
java/org/apache/uima/ducc/ws/server/
java/org/apache/uima/ducc/ws/server/nodeviz/ webapp/roo...
Author: degenaro
Date: Wed Sep 9 19:19:20 2015
New Revision: 1702091
URL: http://svn.apache.org/r1702091
Log:
UIMA-4569 DUCC OR+WS expunge "shares"
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineInfo.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineSummaryInfo.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/IServiceAdapter.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServiceAdapter.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccAbstractHandler.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccConstants.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerClassic.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerJsonFormat.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebProperties.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/VisualizedHost.java
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-job-details.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-jobs.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-reservation-details.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-reservations.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-service-details.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-services.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-administration.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-broker.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-classes.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-daemons.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-machines.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-viz.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservations.jsp
uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/system.machines.jsp
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java Wed Sep 9 19:19:20 2015
@@ -23,9 +23,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
-import java.util.Properties;
import java.util.TreeMap;
-import java.util.TreeSet;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.atomic.AtomicLong;
@@ -33,32 +31,19 @@ import org.apache.uima.ducc.cli.ws.json.
import org.apache.uima.ducc.cli.ws.json.MachineFactsList;
import org.apache.uima.ducc.cli.ws.json.NodePidList;
import org.apache.uima.ducc.common.IDuccEnv;
-import org.apache.uima.ducc.common.NodeIdentity;
import org.apache.uima.ducc.common.node.metrics.NodeUsersInfo;
import org.apache.uima.ducc.common.node.metrics.NodeUsersInfo.NodeProcess;
import org.apache.uima.ducc.common.utils.DuccLogger;
import org.apache.uima.ducc.common.utils.DuccLoggerComponents;
-import org.apache.uima.ducc.common.utils.DuccPropertiesResolver;
import org.apache.uima.ducc.common.utils.TimeStamp;
import org.apache.uima.ducc.common.utils.id.DuccId;
import org.apache.uima.ducc.transport.event.NodeMetricsUpdateDuccEvent;
import org.apache.uima.ducc.transport.event.ProcessInfo;
-import org.apache.uima.ducc.transport.event.common.IDuccProcess;
-import org.apache.uima.ducc.transport.event.common.IDuccProcessMap;
-import org.apache.uima.ducc.transport.event.common.IDuccReservation;
-import org.apache.uima.ducc.transport.event.common.IDuccReservationMap;
-import org.apache.uima.ducc.transport.event.common.IDuccWorkJob;
-import org.apache.uima.ducc.transport.event.common.IDuccWorkMap;
-import org.apache.uima.ducc.transport.event.common.IDuccWorkReservation;
-import org.apache.uima.ducc.transport.event.common.IProcessState.ProcessState;
-import org.apache.uima.ducc.ws.server.DuccConstants;
-import org.apache.uima.ducc.ws.server.DuccWebProperties;
import org.apache.uima.ducc.ws.types.Ip;
import org.apache.uima.ducc.ws.types.NodeId;
import org.apache.uima.ducc.ws.types.UserId;
import org.apache.uima.ducc.ws.utils.DatedNodeMetricsUpdateDuccEvent;
-
public class DuccMachinesData {
private static DuccLogger logger = DuccLoggerComponents.getWsLogger(DuccMachinesData.class.getName());
@@ -71,15 +56,9 @@ public class DuccMachinesData {
private static AtomicLong memoryTotal = new AtomicLong(0);
private static AtomicLong swapInuse = new AtomicLong(0);
private static AtomicLong swapFree = new AtomicLong(0);
- private static AtomicLong sharesTotal = new AtomicLong(0);
- private static AtomicLong sharesInuse = new AtomicLong(0);
-
- private int shareSize = DuccConstants.defaultShareSize;
private String domain = "";
- private static String defined = "defined";
-
private static DuccMachinesData duccMachinesData = new DuccMachinesData();
private static ConcurrentSkipListMap<String,String> ipToNameMap = new ConcurrentSkipListMap<String,String>();
@@ -143,7 +122,7 @@ public class DuccMachinesData {
String memFree = "";
String swapInuse = "";
String swapFree = "";
- MachineInfo machineInfo = new MachineInfo(IDuccEnv.DUCC_NODES_FILE_PATH, "", nodeName, memTotal, memFree, swapInuse, swapFree, false, null, "", "", -1, 0);
+ MachineInfo machineInfo = new MachineInfo(IDuccEnv.DUCC_NODES_FILE_PATH, "", nodeName, memTotal, memFree, swapInuse, swapFree, false, null, -1, 0);
unsortedMachines.put(machineInfo.getName(),machineInfo);
}
updateSortedMachines();
@@ -152,12 +131,6 @@ public class DuccMachinesData {
logger.warn(location, jobid, t);
}
try {
- shareSize = Integer.parseInt(DuccWebProperties.getProperty(DuccWebProperties.key_ducc_rm_share_quantum, DuccWebProperties.val_ducc_rm_share_quantum));
- }
- catch(Throwable t) {
- logger.warn(location, jobid, t);
- }
- try {
InetAddress ia = InetAddress.getLocalHost();
String chn = ia.getCanonicalHostName();
int index = chn.indexOf(".");
@@ -183,8 +156,6 @@ public class DuccMachinesData {
totals.memoryTotal = memoryTotal.get();
totals.swapInuse = swapInuse.get();
totals.swapFree = swapFree.get();
- totals.sharesTotal = sharesTotal.get();
- totals.sharesInuse = sharesInuse.get();
return totals;
}
@@ -195,16 +166,12 @@ public class DuccMachinesData {
memoryTotal.addAndGet(newInfo.memoryTotal-oldInfo.memoryTotal);
swapInuse.addAndGet(newInfo.swapInuse-oldInfo.swapInuse);
swapFree.addAndGet(newInfo.swapFree-oldInfo.swapFree);
- sharesTotal.addAndGet(newInfo.sharesTotal-oldInfo.sharesTotal);
- sharesInuse.addAndGet(newInfo.sharesInuse-oldInfo.sharesInuse);
}
else {
summaryMachines.put(ip.toString(), newInfo);
memoryTotal.addAndGet(newInfo.memoryTotal);
swapInuse.addAndGet(newInfo.swapInuse);
swapFree.addAndGet(newInfo.swapFree);
- sharesTotal.addAndGet(newInfo.sharesTotal);
- sharesInuse.addAndGet(newInfo.sharesInuse);
}
}
@@ -255,9 +222,6 @@ public class DuccMachinesData {
logger.debug(location, jobid, "node: "+machineName+" "+"memFree: "+nodeMemFree);
long lvalMemFree = (long) ((1.0*nodeMemFree)/(1024*1024)+0.0); // do NOT round up!
String memFree = ""+lvalMemFree/*+memUnits*/;
- // shares: total
- msi.sharesTotal = lvalMemFree/shareSize;
- String sharesTotal = ""+lvalMemFree/shareSize;
// swap: in-usewell
double dvalSwapTotal = nodeMetrics.getNodeMemory().getSwapTotal();
long lvalSwapTotal = (long) (dvalSwapTotal/(1024*1024)+0.5);
@@ -277,20 +241,9 @@ public class DuccMachinesData {
//String swapFree = ""+lval/*+memUnits*/;
msi.swapFree = lvalSwapFree;
String swapFree = ""+lvalSwapFree/*+memUnits*/;
- 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();
boolean cGroups = nodeMetrics.getCgroups();
- MachineInfo current = new MachineInfo("", ip.toString(), machineName, memTotal, memFree, ""+swapInuse, ""+swapFree, cGroups, alienPids, sharesTotal, sharesInuse, duccEvent.getMillis(), duccEvent.getEventSize());
+ MachineInfo current = new MachineInfo("", ip.toString(), machineName, memTotal, memFree, ""+swapInuse, ""+swapFree, cGroups, alienPids, duccEvent.getMillis(), duccEvent.getEventSize());
String key = normalizeMachineName(machineName);
MachineInfo previous = unsortedMachines.get(key);
if(previous != null) {
@@ -408,173 +361,6 @@ public class DuccMachinesData {
return retVal;
}
- private int toInt(String s, int deflt)
- {
- int retVal;
- try {
- retVal = Integer.parseInt(s);
- }
- catch(Throwable t) {
- retVal = deflt;
- }
- return retVal;
- }
-
- private Properties getShareMapJobs(Properties properties, int shareSize) {
- String location = "getShareMapJobs";
- try {
- DuccData duccData = DuccData.getInstance();
- IDuccWorkMap duccWorkMap = duccData.getLive();
- Iterator<DuccId> iteratorJ = duccWorkMap.getJobKeySet().iterator();
- while(iteratorJ.hasNext()) {
- DuccId jobid = iteratorJ.next();
- IDuccWorkJob job = (IDuccWorkJob)duccWorkMap.findDuccWork(jobid);
- if(job.isOperational()) {
- int pMemSize = toInt(job.getSchedulingInfo().getShareMemorySize(),1*shareSize);
- long pShareSize = pMemSize/shareSize;
- if(pShareSize <= 0) {
- pShareSize = 1;
- }
- IDuccProcessMap processMap = job.getProcessMap();
- Iterator<DuccId> iteratorP = processMap.keySet().iterator();
- while(iteratorP.hasNext()) {
- DuccId jpid = iteratorP.next();
- IDuccProcess jp = processMap.get(jpid);
- ProcessState processState = jp.getProcessState();
- switch(processState) {
- case Starting:
- case Initializing:
- case Running:
- NodeIdentity nodeIdentity = jp.getNodeIdentity();
- String key = nodeIdentity.getIp().trim();
- Integer value = new Integer(0);
- if(!properties.containsKey(key)) {
- properties.put(key, value);
- }
- value = (Integer)properties.get(key) + (int)pShareSize;
- properties.put(key,value);
- break;
- default:
- break;
- }
- }
- }
- }
- }
- catch(Throwable t) {
- logger.warn(location, jobid, t);
- }
- return properties;
- }
-
- private Properties getShareMapServices(Properties properties, int shareSize) {
- String location = "getShareMapServices";
- try {
- DuccData duccData = DuccData.getInstance();
- IDuccWorkMap duccWorkMap = duccData.getLive();
- Iterator<DuccId> iteratorS = duccWorkMap.getServiceKeySet().iterator();
- while(iteratorS.hasNext()) {
- DuccId jobid = iteratorS.next();
- IDuccWorkJob service = (IDuccWorkJob)duccWorkMap.findDuccWork(jobid);
- if(service.isOperational()) {
- int pMemSize = toInt(service.getSchedulingInfo().getShareMemorySize(),1*shareSize);
- long pShareSize = pMemSize/shareSize;
- if(pShareSize <= 0) {
- pShareSize = 1;
- }
- IDuccProcessMap processMap = service.getProcessMap();
- Iterator<DuccId> iteratorP = processMap.keySet().iterator();
- while(iteratorP.hasNext()) {
- DuccId jpid = iteratorP.next();
- IDuccProcess jp = processMap.get(jpid);
- ProcessState processState = jp.getProcessState();
- switch(processState) {
- case Starting:
- case Initializing:
- case Running:
- NodeIdentity nodeIdentity = jp.getNodeIdentity();
- String key = nodeIdentity.getIp().trim();
- Integer value = new Integer(0);
- if(!properties.containsKey(key)) {
- properties.put(key, value);
- }
- value = (Integer)properties.get(key) + (int)pShareSize;
- properties.put(key,value);
- break;
- default:
- break;
- }
- }
- }
- }
- }
- catch(Throwable t) {
- logger.warn(location, jobid, t);
- }
- return properties;
- }
-
- private Properties getShareMapReservations(Properties properties, int shareSize) {
- String location = "getShareMapReservations";
- try {
- DuccData duccData = DuccData.getInstance();
- IDuccWorkMap duccWorkMap = duccData.getLive();
- Iterator<DuccId> iteratorR = duccWorkMap.getReservationKeySet().iterator();
- while(iteratorR.hasNext()) {
- DuccId reservationId = iteratorR.next();
- IDuccWorkReservation reservation = (IDuccWorkReservation)duccWorkMap.findDuccWork(reservationId);
- if(reservation.isOperational()) {
- IDuccReservationMap reservationMap = reservation.getReservationMap();
- Iterator<DuccId> iteratorS = reservationMap.keySet().iterator();
- while(iteratorS.hasNext()) {
- DuccId spid = iteratorS.next();
- IDuccReservation rs = reservationMap.get(spid);
- NodeIdentity nodeIdentity = rs.getNodeIdentity();
- String key = nodeIdentity.getIp().trim();
- Integer value = new Integer(0);
- if(!properties.containsKey(key)) {
- properties.put(key, value);
- }
- int shares = rs.getShares();
- value = (Integer)properties.get(key) + shares;
- properties.put(key,value);
- }
- }
- }
- }
- catch(Throwable t) {
- logger.warn(location, jobid, t);
- }
- return properties;
- }
-
- private Properties getShareMap(int shareSize) {
- Properties properties = new Properties();
- properties = getShareMapJobs(properties, shareSize);
- properties = getShareMapServices(properties, shareSize);
- properties = getShareMapReservations(properties, shareSize);
- return properties;
- }
-
- private String getReserveSize(MachineInfo machineInfo) {
- long size = 0;
- String reserveSize = "-";
- try {
- long sharesTotal = Long.parseLong(machineInfo.getSharesTotal());
- String ducc_rm_share_quantum = DuccPropertiesResolver.getInstance().getFileProperty(DuccPropertiesResolver.ducc_rm_share_quantum);
- if(ducc_rm_share_quantum != null) {
- ducc_rm_share_quantum = ducc_rm_share_quantum.trim();
- if(ducc_rm_share_quantum.length() > 0) {
- size = Long.parseLong(ducc_rm_share_quantum) * sharesTotal;
- reserveSize = ""+size;
- }
- }
- }
- catch(Exception e) {
- }
- return reserveSize;
- }
-
public MachineFactsList getMachineFactsList() {
MachineFactsList factsList = new MachineFactsList();
ConcurrentSkipListMap<MachineInfo,String> sortedMachines = getSortedMachines();
@@ -585,47 +371,18 @@ public class DuccMachinesData {
String status = machineInfo.getStatus();
String ip = machineInfo.getIp();
String name = machineInfo.getName();
- String reserve = getReserveSize(machineInfo);
- String memory = machineInfo.getMemTotal();
+ String memTotal = machineInfo.getMemTotal();
+ String memFree = machineInfo.getMemFree();
String swapInuse = machineInfo.getSwapInuse();
String swapDelta = ""+machineInfo.getSwapDelta();
String swapFree = machineInfo.getSwapFree();
boolean cGroups = machineInfo.getCgroups();
List<String> aliens = machineInfo.getAliens();
- String sharesTotal = machineInfo.getSharesTotal();
- String sharesInuse = machineInfo.getSharesInuse();
String heartbeat = ""+machineInfo.getElapsed();
- MachineFacts facts = new MachineFacts(status,ip,name,reserve,memory,swapInuse,swapDelta,swapFree,cGroups,aliens,sharesTotal,sharesInuse,heartbeat);
+ MachineFacts facts = new MachineFacts(status,ip,name,memTotal,memFree,swapInuse,swapDelta,swapFree,cGroups,aliens,heartbeat);
factsList.add(facts);
}
return factsList;
}
- public List<Long> getMachineSizes() {
- String location = "getMachineSizes";
- TreeSet<Long> machineSizes = new TreeSet<Long>();
- ConcurrentSkipListMap<MachineInfo,String> sortedMachines = getSortedMachines();
- Iterator<MachineInfo> iterator;
- iterator = sortedMachines.keySet().iterator();
- while(iterator.hasNext()) {
- try {
- MachineInfo machineInfo = iterator.next();
- String status = machineInfo.getStatus();
- if(status != null) {
- if(!status.equals(defined)) {
- String text = getReserveSize(machineInfo);
- Long reserveSize = new Long(text);
- if(!machineSizes.contains(reserveSize)) {
- machineSizes.add(reserveSize);
- }
- }
- }
- }
- catch(Exception e) {
- logger.trace(location, jobid, e);
- }
- }
- List<Long> list = new ArrayList<Long>(machineSizes);
- return list;
- }
}
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineInfo.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineInfo.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineInfo.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineInfo.java Wed Sep 9 19:19:20 2015
@@ -48,8 +48,6 @@ public class MachineInfo implements Comp
private String swapFree;
private boolean cGroups;
private List<ProcessInfo> alienPids;
- private String sharesTotal;
- private String sharesInuse;
private long swapDelta;
private long heartbeat;
private long heartbeatMax;
@@ -57,7 +55,7 @@ public class MachineInfo implements Comp
private long pubSize;
private long pubSizeMax;
- public MachineInfo(String fileDef, String ip, String name, String memTotal, String memFree, String swapInuse, String swapFree, boolean cGroups, List<ProcessInfo> alienPids, String sharesTotal, String sharesInuse, long heartbeat, long pubSize) {
+ public MachineInfo(String fileDef, String ip, String name, String memTotal, String memFree, String swapInuse, String swapFree, boolean cGroups, List<ProcessInfo> alienPids, long heartbeat, long pubSize) {
this.fileDef = fileDef;
this.ip = ip;
this.name = name;
@@ -70,8 +68,6 @@ public class MachineInfo implements Comp
if(this.alienPids == null) {
this.alienPids = new ArrayList<ProcessInfo>();
}
- this.sharesTotal = sharesTotal;
- this.sharesInuse = sharesInuse;
this.swapDelta = 0;
this.heartbeat = heartbeat;
this.heartbeatMax = 0;
@@ -186,14 +182,6 @@ public class MachineInfo implements Comp
return retVal;
}
- public String getSharesTotal() {
- return this.sharesTotal;
- }
-
- public String getSharesInuse() {
- return this.sharesInuse;
- }
-
public long getSwapDelta() {
return this.swapDelta;
}
@@ -308,14 +296,6 @@ public class MachineInfo implements Comp
if(retVal != 0) {
return retVal;
}
- retVal = compareSharesInuse(m1, m2);
- if(retVal != 0) {
- return retVal;
- }
- retVal = compareSharesTotal(m1, m2);
- if(retVal != 0) {
- return retVal;
- }
/*
retVal = compareHeartbeat(m1, m2);
if(retVal != 0) {
@@ -403,40 +383,6 @@ public class MachineInfo implements Comp
if(v1 > v2) {
return -1;
}
- if(v1 < v2) {
- return 1;
- }
- }
- catch(Throwable t) {
- }
- return retVal;
- }
-
- private int compareSharesInuse(MachineInfo m1, MachineInfo m2) {
- int retVal = 0;
- try {
- long v1 = Long.parseLong(m1.getSharesInuse());
- long v2 = Long.parseLong(m2.getSharesInuse());
- if(v1 > v2) {
- return -1;
- }
- if(v1 < v2) {
- return 1;
- }
- }
- catch(Throwable t) {
- }
- return retVal;
- }
-
- private int compareSharesTotal(MachineInfo m1, MachineInfo m2) {
- int retVal = 0;
- try {
- long v1 = Long.parseLong(m1.getSharesTotal());
- long v2 = Long.parseLong(m2.getSharesTotal());
- if(v1 > v2) {
- return -1;
- }
if(v1 < v2) {
return 1;
}
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineSummaryInfo.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineSummaryInfo.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineSummaryInfo.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/MachineSummaryInfo.java Wed Sep 9 19:19:20 2015
@@ -23,6 +23,4 @@ public class MachineSummaryInfo {
public long memoryTotal = 0;
public long swapInuse = 0;
public long swapFree = 0;
- public long sharesTotal = 0;
- public long sharesInuse = 0;
}
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/IServiceAdapter.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/IServiceAdapter.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/IServiceAdapter.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/IServiceAdapter.java Wed Sep 9 19:19:20 2015
@@ -62,7 +62,7 @@ public interface IServiceAdapter {
public String getState();
public String getStatistics();
public String getUser();
- public String getShareClass();
+ public String getSchedulingClass();
public String getDescription();
public String getDisableReason();
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServiceAdapter.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServiceAdapter.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServiceAdapter.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServiceAdapter.java Wed Sep 9 19:19:20 2015
@@ -359,7 +359,7 @@ public class ServiceAdapter implements I
}
@Override
- public String getShareClass() {
+ public String getSchedulingClass() {
String value = si.getSchedulingClass();
return value;
}
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccAbstractHandler.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccAbstractHandler.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccAbstractHandler.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccAbstractHandler.java Wed Sep 9 19:19:20 2015
@@ -22,15 +22,12 @@ import java.io.File;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
-import java.util.ListIterator;
import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.exception.ExceptionUtils;
-import org.apache.uima.ducc.cli.ws.json.MachineFacts;
-import org.apache.uima.ducc.cli.ws.json.MachineFactsList;
import org.apache.uima.ducc.common.NodeIdentity;
import org.apache.uima.ducc.common.boot.DuccDaemonRuntimeProperties.DaemonName;
import org.apache.uima.ducc.common.internationalization.Messages;
@@ -52,7 +49,6 @@ import org.apache.uima.ducc.transport.ev
import org.apache.uima.ducc.transport.event.common.IRationale;
import org.apache.uima.ducc.ws.DuccDataHelper;
import org.apache.uima.ducc.ws.DuccMachinesData;
-import org.apache.uima.ducc.ws.JobProcessInfo;
import org.apache.uima.ducc.ws.registry.IServicesRegistry;
import org.apache.uima.ducc.ws.registry.ServicesRegistry;
import org.apache.uima.ducc.ws.server.DuccCookies.DateStyle;
@@ -666,7 +662,7 @@ public abstract class DuccAbstractHandle
int usableProcessCount = job.getProcessMap().getUsableProcessCount();
if(usableProcessCount > 0) {
if(completed > 0) {
- int threadsPerProcess = schedulingInfo.getIntThreadsPerShare();
+ int threadsPerProcess = schedulingInfo.getIntThreadsPerProcess();
int totalThreads = usableProcessCount * threadsPerProcess;
double remainingIterations = remainingWorkItems / totalThreads;
double avgMillis = perWorkItemStatistics.getMean();
@@ -1083,54 +1079,4 @@ public abstract class DuccAbstractHandle
return sb;
}
- private boolean isAtLeastOneJobProcessStuck(MachineFactsList factsList) {
- boolean retVal = false;
- if(factsList.size() > 0) {
- ListIterator<MachineFacts> listIterator = factsList.listIterator();
- while(listIterator.hasNext()) {
- MachineFacts facts = listIterator.next();
- String nodeStatus = facts.status;
- if(!nodeStatus.equals("up")) {
- ArrayList<JobProcessInfo> list = DuccDataHelper.getInstance().getJobProcessInfoList(facts.name);
- if(!list.isEmpty()) {
- retVal = true;
- break;
- }
- }
- }
- }
- return retVal;
- }
-
- public String buildReleaseAll(HttpServletRequest request, MachineFactsList factsList) {
- String retVal = "";
- if(isAtLeastOneJobProcessStuck(factsList)) {
- String hover = getDisabledWithHover(request,"");
- String node = "'"+"*"+"'";
- String type = "'"+"jobs"+"'";
- if(node != null) {
- retVal = "<input type=\"button\" onclick=\"ducc_confirm_release_shares("+node+","+type+")\" value=\"Release *ALL* Stuck Job Shares\" "+hover+"/>";
- }
- }
- return retVal;
- }
-
- public String buildReleaseMachine(HttpServletRequest request, MachineFacts facts) {
- String retVal = "";
- String nodeStatus = facts.status;
- if(!nodeStatus.equals("up")) {
- ArrayList<JobProcessInfo> list = DuccDataHelper.getInstance().getJobProcessInfoList(facts.name);
- if(terminateEnabled) {
- if(!list.isEmpty()) {
- String hover = getDisabledWithHover(request,"");
- String node = "'"+facts.name+"'";
- String type = "'"+"jobs"+"'";
- if(node != null) {
- retVal = "<input type=\"button\" onclick=\"ducc_confirm_release_shares("+node+","+type+")\" value=\"Release Machine Stuck Job Shares\" "+hover+"/>";
- }
- }
- }
- }
- return retVal;
- }
}
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccConstants.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccConstants.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccConstants.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccConstants.java Wed Sep 9 19:19:20 2015
@@ -22,7 +22,6 @@ public class DuccConstants {
public static final int workItemsDisplayMax = 4096;
- public static final int defaultShareSize = 15;
public static final int[] memorySizes = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
public static final String hintPreferencesDescriptionStyleShort = "Hint: use Preferences -> Description Style [Short] to hide everything left of last /";
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java Wed Sep 9 19:19:20 2015
@@ -43,8 +43,6 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.uima.ducc.cli.ws.json.MachineFacts;
-import org.apache.uima.ducc.cli.ws.json.MachineFactsList;
import org.apache.uima.ducc.common.CancelReasons.CancelReason;
import org.apache.uima.ducc.common.NodeConfiguration;
import org.apache.uima.ducc.common.boot.DuccDaemonRuntimeProperties;
@@ -90,7 +88,6 @@ import org.apache.uima.ducc.ws.DuccDaemo
import org.apache.uima.ducc.ws.DuccData;
import org.apache.uima.ducc.ws.DuccDataHelper;
import org.apache.uima.ducc.ws.DuccMachinesData;
-import org.apache.uima.ducc.ws.JobProcessInfo;
import org.apache.uima.ducc.ws.MachineInfo;
import org.apache.uima.ducc.ws.MachineSummaryInfo;
import org.apache.uima.ducc.ws.authentication.DuccAsUser;
@@ -126,7 +123,7 @@ public class DuccHandler extends DuccAbs
private static DuccId jobid = null;
private enum DetailsType { Job, Reservation, Service };
- private enum ShareType { JD, MR, SPC, SPU, UIMA };
+ private enum AllocationType { JD, MR, SPC, SPU, UIMA };
private enum LogType { POP, UIMA };
private DuccAuthenticator duccAuthenticator = DuccAuthenticator.getInstance();
@@ -183,8 +180,6 @@ public class DuccHandler extends DuccAbs
private String duccServiceUpdate = duccContext+"/service-update-request";
- private String duccReleaseShares = duccContext+"/release-shares-request";
-
private String jsonMachinesData = duccContext+"/json-machines-data";
private String jsonSystemClassesData = duccContext+"/json-system-classes-data";
private String jsonSystemDaemonsData = duccContext+"/json-system-daemons-data";
@@ -197,7 +192,6 @@ public class DuccHandler extends DuccAbs
private String duccServiceUpdateFormButton = duccContext+"/service-update-get-form-button";
private String duccReservationSchedulingClasses = duccContext+"/reservation-scheduling-classes";
- private String duccReservationInstanceMemorySizes = duccContext+"/reservation-memory-sizes";
private String duccReservationInstanceMemoryUnits = duccContext+"/reservation-memory-units";
protected String headProvider = "Provider";
@@ -355,7 +349,7 @@ public class DuccHandler extends DuccAbs
}
*/
- private String buildLogFileName(IDuccWorkJob job, IDuccProcess process, ShareType type) {
+ private String buildLogFileName(IDuccWorkJob job, IDuccProcess process, AllocationType type) {
String retVal = "";
if(process != null) {
switch(type) {
@@ -586,7 +580,7 @@ public class DuccHandler extends DuccAbs
return sb.toString();
}
- private String getTimeInit(IDuccWorkJob job, IDuccProcess process, ShareType sType) {
+ private String getTimeInit(IDuccWorkJob job, IDuccProcess process, AllocationType sType) {
String location = "getTimeInit";
StringBuffer sb = new StringBuffer();
if(process != null) {
@@ -669,7 +663,7 @@ public class DuccHandler extends DuccAbs
return sb.toString();
}
- private String getTimeRun(IDuccWorkJob job, IDuccProcess process, ShareType sType) {
+ private String getTimeRun(IDuccWorkJob job, IDuccProcess process, AllocationType sType) {
String location = "getTimeRun";
StringBuffer sb = new StringBuffer();
if(process != null) {
@@ -728,7 +722,7 @@ public class DuccHandler extends DuccAbs
private SynchronizedSimpleDateFormat dateFormat = new SynchronizedSimpleDateFormat("HH:mm:ss");
- private String getTimeGC(IDuccWorkJob job, IDuccProcess process, ShareType sType) {
+ private String getTimeGC(IDuccWorkJob job, IDuccProcess process, AllocationType sType) {
StringBuffer sb = new StringBuffer();
if(process != null) {
switch(sType) {
@@ -751,7 +745,7 @@ public class DuccHandler extends DuccAbs
return sb.toString();
}
- private String getPgIn(IDuccWorkJob job, IDuccProcess process, ShareType sType) {
+ private String getPgIn(IDuccWorkJob job, IDuccProcess process, AllocationType sType) {
StringBuffer sb = new StringBuffer();
if(process != null) {
switch(sType) {
@@ -773,7 +767,7 @@ public class DuccHandler extends DuccAbs
private DecimalFormat formatter = new DecimalFormat("##0.0");
- private String getSwap(IDuccWorkJob job, IDuccProcess process, ShareType sType) {
+ private String getSwap(IDuccWorkJob job, IDuccProcess process, AllocationType sType) {
StringBuffer sb = new StringBuffer();
if(process != null) {
switch(sType) {
@@ -906,7 +900,7 @@ public class DuccHandler extends DuccAbs
return sb.toString();
}
- private String getJConsole(IDuccWorkJob job, IDuccProcess process, ShareType sType) {
+ private String getJConsole(IDuccWorkJob job, IDuccProcess process, AllocationType sType) {
StringBuffer sb = new StringBuffer();
if(process != null) {
switch(process.getProcessState()) {
@@ -953,7 +947,7 @@ public class DuccHandler extends DuccAbs
return retVal;
}
- private void buildJobProcessListEntry(EffectiveUser eu, StringBuffer pb, DuccWorkJob job, IDuccProcess process, DetailsType dType, ShareType sType, int counter, Map<String, FileInfo> fileInfoMap) {
+ private void buildJobProcessListEntry(EffectiveUser eu, StringBuffer pb, DuccWorkJob job, IDuccProcess process, DetailsType dType, AllocationType sType, int counter, Map<String, FileInfo> fileInfoMap) {
StringBuffer rb = new StringBuffer();
int COLS = 26;
switch(sType) {
@@ -1540,7 +1534,7 @@ public class DuccHandler extends DuccAbs
DuccId processId = iterator.next();
IDuccProcess process = job.getDriver().getProcessMap().get(processId);
StringBuffer bb = new StringBuffer();
- buildJobProcessListEntry(eu, bb, job, process, DetailsType.Job, ShareType.JD, counter, fileInfoMap);
+ buildJobProcessListEntry(eu, bb, job, process, DetailsType.Job, AllocationType.JD, counter, fileInfoMap);
if(bb.length() > 0) {
sb.append(bb.toString());
counter++;
@@ -1559,7 +1553,7 @@ public class DuccHandler extends DuccAbs
JobDetailsProcesses jdp = sortedIterator.next();
IDuccProcess process = jdp.getProcess();
StringBuffer bb = new StringBuffer();
- buildJobProcessListEntry(eu, bb, job, process, DetailsType.Job, ShareType.UIMA, counter, fileInfoMap);
+ buildJobProcessListEntry(eu, bb, job, process, DetailsType.Job, AllocationType.UIMA, counter, fileInfoMap);
if(bb.length() > 0) {
sb.append(bb.toString());
counter++;
@@ -2197,7 +2191,7 @@ public class DuccHandler extends DuccAbs
duccLogger.trace(methodName, null, messages.fetch("exit"));
}
- private void buildServiceFilesListEntry(Request baseRequest,HttpServletRequest request, StringBuffer sb, DuccWorkJob job, IDuccProcess process, ShareType type, int counter, Map<String, FileInfo> map) {
+ private void buildServiceFilesListEntry(Request baseRequest,HttpServletRequest request, StringBuffer sb, DuccWorkJob job, IDuccProcess process, AllocationType type, int counter, Map<String, FileInfo> map) {
EffectiveUser eu = EffectiveUser.create(request);
if(job != null) {
try {
@@ -2274,11 +2268,11 @@ public class DuccHandler extends DuccAbs
Iterator<DuccId> iterator = null;
iterator = duccWorkMap.getServiceKeySet().iterator();
int counter = 0;
- ShareType type = ShareType.SPU;
+ AllocationType type = AllocationType.SPU;
String service_type = properties.getProperty(IServicesRegistry.service_type);
if(service_type != null) {
if(service_type.equalsIgnoreCase(IServicesRegistry.service_type_CUSTOM)) {
- type = ShareType.SPC;
+ type = AllocationType.SPC;
}
}
EffectiveUser eu = EffectiveUser.create(request);
@@ -2426,7 +2420,7 @@ public class DuccHandler extends DuccAbs
String key = "cap.large";
String capFile = DuccWebServerHelper.getImageFileName(key);
if(capFile != null) {
- if(job.getSchedulingInfo().getLongSharesMax() < 0) {
+ if(job.getSchedulingInfo().getLongProcessesMax() < 0) {
data.append("<tr>");
data.append("<td>");
sb.append("<span title=\"capped at current number of running processes due to excessive initialization failures\">");
@@ -2444,7 +2438,7 @@ public class DuccHandler extends DuccAbs
DuccId processId = processIterator.next();
IDuccProcess process = processMap.get(processId);
String logsjobdir = job.getUserLogsDir()+job.getDuccId().getFriendly()+File.separator;
- String logfile = buildLogFileName(job, process, ShareType.UIMA);
+ String logfile = buildLogFileName(job, process, AllocationType.UIMA);
String link = logfile;
String reason = process.getReasonForStoppingProcess();
if(reason != null) {
@@ -2494,7 +2488,7 @@ public class DuccHandler extends DuccAbs
DuccId processId = processIterator.next();
IDuccProcess process = processMap.get(processId);
String logsjobdir = job.getUserLogsDir()+job.getDuccId().getFriendly()+File.separator;
- String logfile = buildLogFileName(job, process, ShareType.UIMA);
+ String logfile = buildLogFileName(job, process, AllocationType.UIMA);
String link = logfile;
String reason = process.getReasonForStoppingProcess();
if(reason != null) {
@@ -2518,7 +2512,7 @@ public class DuccHandler extends DuccAbs
duccLogger.trace(methodName, null, messages.fetch("exit"));
}
- private void buildServiceProcessListEntry(EffectiveUser eu, StringBuffer sb, DuccWorkJob job, IDuccProcess process, DetailsType dType, ShareType sType, int counter, Map<String, FileInfo> fileInfoMap) {
+ private void buildServiceProcessListEntry(EffectiveUser eu, StringBuffer sb, DuccWorkJob job, IDuccProcess process, DetailsType dType, AllocationType sType, int counter, Map<String, FileInfo> fileInfoMap) {
buildJobProcessListEntry(eu, sb, job, process, dType, sType, counter, fileInfoMap);
}
@@ -2554,7 +2548,7 @@ public class DuccHandler extends DuccAbs
while(iterator.hasNext()) {
DuccId processId = iterator.next();
IDuccProcess process = managedReservation.getProcessMap().get(processId);
- buildServiceProcessListEntry(eu, sb, managedReservation, process, DetailsType.Reservation, ShareType.MR, ++counter, fileInfoMap);
+ buildServiceProcessListEntry(eu, sb, managedReservation, process, DetailsType.Reservation, AllocationType.MR, ++counter, fileInfoMap);
}
}
if(sb.length() == 0) {
@@ -2654,11 +2648,11 @@ public class DuccHandler extends DuccAbs
IDuccWorkMap duccWorkMap = DuccData.getInstance().get();
List<DuccWorkJob> servicesList = duccWorkMap.getServices(implementors);
int counter = 0;
- ShareType type = ShareType.SPU;
+ AllocationType type = AllocationType.SPU;
String service_type = properties.getProperty(IServicesRegistry.service_type);
if(service_type != null) {
if(service_type.equalsIgnoreCase(IServicesRegistry.service_type_CUSTOM)) {
- type = ShareType.SPC;
+ type = AllocationType.SPC;
}
}
EffectiveUser eu = EffectiveUser.create(request);
@@ -3105,8 +3099,6 @@ public class DuccHandler extends DuccAbs
long swapInuse = 0;
long swapFree = 0;
long alienPids = 0;
- long sharesTotal = 0;
- long sharesInuse = 0;
while(iterator.hasNext()) {
MachineInfo machineInfo = iterator.next();
try {
@@ -3126,14 +3118,6 @@ public class DuccHandler extends DuccAbs
}
}
catch(Exception e) {};
- try {
- sharesTotal += Long.parseLong(machineInfo.getSharesTotal());
- }
- catch(Exception e) {};
- try {
- sharesInuse += Long.parseLong(machineInfo.getSharesInuse());
- }
- catch(Exception e) {};
}
// pass 2
iterator = sortedMachines.keySet().iterator();
@@ -3154,10 +3138,6 @@ public class DuccHandler extends DuccAbs
sb.append(",");
sb.append(quote(""+alienPids));
sb.append(",");
- sb.append(quote(""+sharesTotal));
- sb.append(",");
- sb.append(quote(""+sharesInuse));
- sb.append(",");
sb.append(quote(""));
sb.append("]");
@@ -3200,10 +3180,6 @@ public class DuccHandler extends DuccAbs
}
sb.append(quote(alienPidsDisplay));
sb.append(",");
- sb.append(quote(machineInfo.getSharesTotal()));
- sb.append(",");
- sb.append(quote(machineInfo.getSharesInuse()));
- sb.append(",");
sb.append(quote(machineInfo.getElapsed()));
sb.append("]");
@@ -3651,6 +3627,10 @@ public class DuccHandler extends DuccAbs
duccLogger.trace(methodName, null, messages.fetch("exit"));
}
+ private long KB = 1000;
+ private long MB = 1000*KB;
+ private long GB = 1000*MB;
+
private void handleDuccServletClusterUtilization(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response)
throws IOException, ServletException
{
@@ -3663,8 +3643,12 @@ public class DuccHandler extends DuccAbs
DecimalFormat percentageFormatter = new DecimalFormat("##0.0");
String utilization = "0%";
- if(msi.sharesTotal > 0) {
- double percentage = (((1.0) * msi.sharesInuse) / ((1.0) * msi.sharesTotal)) * 100.0;
+
+ long memoryTotal = msi.memoryTotal * GB;
+ long memoryInuse = DuccData.getInstance().getLive().getMemoryInuse();
+
+ if(memoryTotal > 0) {
+ double percentage = (((1.0) * memoryInuse) / ((1.0) * memoryTotal)) * 100.0;
utilization = percentageFormatter.format(percentage)+"%";
}
@@ -3708,20 +3692,6 @@ public class DuccHandler extends DuccAbs
duccLogger.trace(methodName, null, messages.fetch("exit"));
}
- private void handleDuccServletReservationInstanceMemorySizes(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response)
- throws IOException, ServletException
- {
- String methodName = "handleDuccServletReservationInstanceMemorySizes";
- duccLogger.trace(methodName, null, messages.fetch("enter"));
- StringBuffer sb = new StringBuffer();
- List<Long> machineSizes = DuccMachinesData.getInstance().getMachineSizes();
- for(Long machineSize : machineSizes) {
- sb.append("<option value=\""+machineSize+"\">");
- }
- response.getWriter().println(sb);
- duccLogger.trace(methodName, null, messages.fetch("exit"));
- }
-
private void handleDuccServletReservationInstanceMemoryUnits(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response)
throws IOException, ServletException
{
@@ -4562,109 +4532,6 @@ public class DuccHandler extends DuccAbs
duccLogger.trace(methodName, null, messages.fetch("exit"));
}
- private void handleDuccServletReleaseShares(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response)
- throws IOException, ServletException
- {
- String methodName = "handleDuccServletReleaseShares";
- duccLogger.trace(methodName, null, messages.fetch("enter"));
-
- String result = "";
-
- if(!isAuthenticated(request,response)) {
- result = "error: not authenticated";
- response.getWriter().println(result);
- duccLogger.debug(methodName, null, result);
- }
- else if(!isAdministrator(request,response)) {
- result = "error: not administrator";
- response.getWriter().println(result);
- duccLogger.debug(methodName, null, result);
- }
- else {
- String node = request.getParameter("node");
- String type = request.getParameter("type");
- duccLogger.info(methodName, null, "node:"+node+" "+"type:"+type);
-
- if(node != null) {
- node = node.trim();
- }
- else {
- node = "";
- }
-
- if(type != null) {
- type = type.trim();
- }
- else {
- type = "";
- }
-
- if(node.length() < 1) {
- result = "error: node missing";
- response.getWriter().println(result);
- }
- else if(type.length() < 1) {
- result = "error: type missing";
- response.getWriter().println(result);
- }
- else {
- if(type.equalsIgnoreCase("jobs")) {
- ArrayList<String> nodeList = new ArrayList<String>();
- MachineFactsList mfl = DuccMachinesData.getInstance().getMachineFactsList();
- Iterator<MachineFacts> mfIterator = mfl.iterator();
- while(mfIterator.hasNext()) {
- MachineFacts mf = mfIterator.next();
- if(mf.status != null) {
- if(mf.status != "up") {
- if(mf.name != null) {
- if(node.equals("*")) {
- nodeList.add(mf.name);
- }
- else if(node.equals(mf.name)) {
- nodeList.add(mf.name);
- }
- }
-
- }
- }
- }
- ArrayList<JobProcessInfo> list = DuccDataHelper.getInstance().getJobProcessIds(nodeList);
- if(list.isEmpty()) {
- result = "info: no job processes found on node";
- response.getWriter().println(result);
- }
- else {
- Iterator<JobProcessInfo> iterator = list.iterator();
- String userId = getUserIdFromRequest(request);
- String cp = System.getProperty("java.class.path");
- String java = "/bin/java";
- String jclass = "org.apache.uima.ducc.cli.DuccJobCancel";
- String jhome = System.getProperty("java.home");
- while(iterator.hasNext()) {
- JobProcessInfo jpi = iterator.next();
- String arg1 = "--id";
- String arg2 = ""+jpi.jobId.getFriendly();
- String arg3 = "--dpid";
- String arg4 = ""+jpi.procid.getFriendly();
- String arg5 = "--"+SpecificationProperties.key_role_administrator;
- String arg6 = "--"+SpecificationProperties.key_reason;
- String arg7 = "\"administrator "+userId+" released shares for this machine\"";
- String[] arglistAdministrator = { "-u", userId, "--", jhome+java, "-cp", cp, jclass, arg1, arg2, arg3, arg4, arg5, arg6, arg7 };
- result = DuccAsUser.duckling(userId, arglistAdministrator);
- response.getWriter().println(result);
- }
- }
- }
- else {
- result = "error: type invalid";
- response.getWriter().println(result);
- }
- }
- }
-
- duccLogger.trace(methodName, null, messages.fetch("exit"));
- }
-
private void handleDuccRequest(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response)
throws Exception
{
@@ -4857,19 +4724,10 @@ public class DuccHandler extends DuccAbs
handleDuccServletServiceUpdate(target, baseRequest, request, response);
DuccWebUtil.noCache(response);
}
- else if(reqURI.startsWith(duccReleaseShares)) {
- duccLogger.info(methodName, null,"getRequestURI():"+request.getRequestURI());
- handleDuccServletReleaseShares(target, baseRequest, request, response);
- DuccWebUtil.noCache(response);
- }
else if(reqURI.startsWith(duccReservationSchedulingClasses)) {
handleDuccServletReservationSchedulingClasses(target, baseRequest, request, response);
DuccWebUtil.noCache(response);
}
- else if(reqURI.startsWith(duccReservationInstanceMemorySizes)) {
- handleDuccServletReservationInstanceMemorySizes(target, baseRequest, request, response);
- DuccWebUtil.noCache(response);
- }
else if(reqURI.startsWith(duccReservationInstanceMemoryUnits)) {
handleDuccServletReservationInstanceMemoryUnits(target, baseRequest, request, response);
DuccWebUtil.noCache(response);
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerClassic.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerClassic.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerClassic.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerClassic.java Wed Sep 9 19:19:20 2015
@@ -247,7 +247,7 @@ public class DuccHandlerClassic extends
sb.append("<td valign=\"bottom\" align=\"right\">");
long initFails = job.getProcessInitFailureCount();
if(initFails > 0) {
- if(job.getSchedulingInfo().getLongSharesMax() < 0) {
+ if(job.getSchedulingInfo().getLongProcessesMax() < 0) {
DisplayStyle style = DuccCookies.getDisplayStyle(request);
String key = "cap.small";
String capFile = DuccWebServerHelper.getImageFileName(key);
@@ -309,8 +309,8 @@ public class DuccHandlerClassic extends
sb.append("</td>");
// Size
sb.append("<td valign=\"bottom\" align=\"right\">");
- String size = job.getSchedulingInfo().getShareMemorySize();
- MemoryUnits units = job.getSchedulingInfo().getShareMemoryUnits();
+ String size = job.getSchedulingInfo().getMemorySize();
+ MemoryUnits units = job.getSchedulingInfo().getMemoryUnits();
sb.append(getProcessMemorySize(duccId,type,size,units));
sb.append("</td>");
// Total
@@ -457,7 +457,7 @@ public class DuccHandlerClassic extends
if(user != null) {
DuccPropertiesResolver dpr = DuccPropertiesResolver.getInstance();
String jdHostUser = dpr.getCachedProperty(DuccPropertiesResolver.ducc_jd_host_user);
- // We presume that user is sufficient to identify JD shares
+ // We presume that user is sufficient to identify JD allocation
if(user.equals(jdHostUser)) {
disabled = "disabled=\"disabled\"";
}
@@ -744,8 +744,8 @@ public class DuccHandlerClassic extends
sb.append("</td>");
// Size
sb.append("<td align=\"right\">");
- String size = duccwork.getSchedulingInfo().getShareMemorySize();
- MemoryUnits units = duccwork.getSchedulingInfo().getShareMemoryUnits();
+ String size = duccwork.getSchedulingInfo().getMemorySize();
+ MemoryUnits units = duccwork.getSchedulingInfo().getMemoryUnits();
sb.append(getProcessMemorySize(duccId,type,size,units));
sb.append("</td>");
// Host Names
@@ -989,15 +989,15 @@ public class DuccHandlerClassic extends
// Share Class (or Type)
sb.append("<td>");
if(service.isPingOnly()) {
- String shareClass = service.getShareClass();
- sb.append("<span title=\""+shareClass+"\">");
- String shareType = "ping-only";
+ String schedulingClass = service.getSchedulingClass();
+ sb.append("<span title=\""+schedulingClass+"\">");
+ String serviceType = "ping-only";
sb.append("<span>");
- sb.append(shareType);
+ sb.append(serviceType);
}
else {
- String shareClass = service.getShareClass();
- sb.append(shareClass);
+ String schedulingClass = service.getSchedulingClass();
+ sb.append(schedulingClass);
}
sb.append("</td>");
// PgIn
@@ -1521,16 +1521,16 @@ public class DuccHandlerClassic extends
int counter = 0;
- int sumMemoryEffective = 0;
- int sumMemoryTotal = 0;
+ int sumMemTotal = 0;
+ int sumMemFree = 0;
int sumSwapInuse = 0;
/*
int sumSwapDelta = 0;
*/
int sumSwapFree = 0;
int sumAliens = 0;
- int sumSharesTotal = 0;
- int sumSharesInuse = 0;
+
+ String hover;
ListIterator<MachineFacts> listIterator;
StringBuffer row;
@@ -1545,16 +1545,14 @@ public class DuccHandlerClassic extends
while(listIterator.hasNext()) {
MachineFacts facts = listIterator.next();
try {
- sumMemoryEffective += Integer.parseInt(facts.memoryEffective);
- sumMemoryTotal += Integer.parseInt(facts.memoryTotal);
+ sumMemTotal += Integer.parseInt(facts.memTotal);
+ sumMemFree += Integer.parseInt(facts.memFree);
sumSwapInuse += Integer.parseInt(facts.swapInuse);
/*
sumSwapDelta += Integer.parseInt(facts.swapDelta);
*/
sumSwapFree += Integer.parseInt(facts.swapFree);
sumAliens += facts.aliens.size();
- sumSharesTotal += Integer.parseInt(facts.sharesTotal);
- sumSharesInuse += Integer.parseInt(facts.sharesInuse);
}
catch(Exception e) {
duccLogger.trace(methodName, jobid, e);
@@ -1562,11 +1560,6 @@ public class DuccHandlerClassic extends
}
row = new StringBuffer();
row.append("<tr>");
- // Release ALL Stuck JPs
- row.append("<td>");
- String releaseAll = buildReleaseAll(request, factsList);
- row.append(releaseAll);
- row.append("</td>");
// Status
row.append("<td>");
row.append(""+"Total");
@@ -1580,12 +1573,9 @@ public class DuccHandlerClassic extends
row.append("");
row.append("</td>");
// Memory: usable
- row.append("<td align=\"right\">");
- row.append(""+sumMemoryEffective);
- row.append("</td>");
- // Memory: total
- row.append("<td align=\"right\">");
- row.append(""+sumMemoryTotal);
+ hover = "title=\"total="+sumMemTotal+"\"";
+ row.append("<td align=\"right\" "+hover+">");
+ row.append(""+sumMemFree);
row.append("</td>");
// Swap: inuse
row.append("<td align=\"right\">");
@@ -1609,14 +1599,6 @@ public class DuccHandlerClassic extends
row.append("<td align=\"right\">");
row.append(""+sumAliens);
row.append("</td>");
- // Shares: total
- row.append("<td align=\"right\">");
- row.append(""+sumSharesTotal);
- row.append("</td>");
- // Shares:inuse
- row.append("<td align=\"right\">");
- row.append(""+sumSharesInuse);
- row.append("</td>");
// Heartbeat: last
row.append("<td align=\"right\">");
row.append("");
@@ -1629,11 +1611,6 @@ public class DuccHandlerClassic extends
MachineFacts facts = listIterator.next();
row = new StringBuffer();
row.append((trGet(counter)));
- // Release Machine Stuck JPs
- row.append("<td>");
- String releaseMachine = buildReleaseMachine(request, facts);
- row.append(releaseMachine);
- row.append("</td>");
// Status
StringBuffer sb = new StringBuffer();
String status = facts.status;
@@ -1662,13 +1639,10 @@ public class DuccHandlerClassic extends
row.append(facts.name);
row.append("</td>");
// Memory: usable
- row.append("<td align=\"right\">");
- row.append(facts.memoryEffective);
- row.append("</td>");
- // Memory: total
- row.append("<td align=\"right\">");
+ hover = "title=\"total="+facts.memTotal+"\"";
+ row.append("<td align=\"right\" "+hover+">");
if(!status.equals("defined")) {
- row.append(facts.memoryTotal);
+ row.append(facts.memFree);
}
row.append("</td>");
// Swap: inuse
@@ -1753,36 +1727,6 @@ public class DuccHandlerClassic extends
row.append(sb);
}
row.append("</td>");
- // Shares
- int sharesTotal = 0;
- int sharesInuse = 0;
- try {
- int total = Integer.parseInt(facts.sharesTotal);
- int inuse = Integer.parseInt(facts.sharesInuse);
- sharesTotal = total;
- sharesInuse = inuse;
- }
- catch(Exception e) {
- }
- // Shares: total
- row.append("<td align=\"right\">");
- if(!status.equals("defined")) {
- row.append(facts.sharesTotal);
- }
- row.append("</td>");
- // Shares: inuse
- row.append("<td align=\"right\">");
- String span0 = "<span class=\"health_black\">";
- String span1 = "</span>";
- if(sharesInuse > sharesTotal) {
- span0 = "<span class=\"health_red\">";
- }
- if(!status.equals("defined")) {
- row.append(span0);
- row.append(facts.sharesInuse);
- row.append(span1);
- }
- row.append("</td>");
// Heartbeat: last
row.append("<td align=\"right\">");
if(!status.equals("defined")) {
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerJsonFormat.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerJsonFormat.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerJsonFormat.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandlerJsonFormat.java Wed Sep 9 19:19:20 2015
@@ -275,7 +275,7 @@ public class DuccHandlerJsonFormat exten
sb = new StringBuffer();
long initFails = job.getProcessInitFailureCount();
if(initFails > 0) {
- if(job.getSchedulingInfo().getLongSharesMax() < 0) {
+ if(job.getSchedulingInfo().getLongProcessesMax() < 0) {
DisplayStyle style = DuccCookies.getDisplayStyle(request);
String key = "cap.small";
String capFile = DuccWebServerHelper.getImageFileName(key);
@@ -344,8 +344,8 @@ public class DuccHandlerJsonFormat exten
// Size
sb = new StringBuffer();
sb.append("<span>");
- String size = job.getSchedulingInfo().getShareMemorySize();
- MemoryUnits units = job.getSchedulingInfo().getShareMemoryUnits();
+ String size = job.getSchedulingInfo().getMemorySize();
+ MemoryUnits units = job.getSchedulingInfo().getMemoryUnits();
sb.append(getProcessMemorySize(duccId,type,size,units));
sb.append("</span>");
row.add(new JsonPrimitive(sb.toString()));
@@ -559,7 +559,7 @@ public class DuccHandlerJsonFormat exten
if(user != null) {
DuccPropertiesResolver dpr = DuccPropertiesResolver.getInstance();
String jdHostUser = dpr.getCachedProperty(DuccPropertiesResolver.ducc_jd_host_user);
- // We presume that user is sufficient to identify JD shares
+ // We presume that user is sufficient to identify JD allocation
if(user.equals(jdHostUser)) {
disabled = "disabled=\"disabled\"";
}
@@ -843,8 +843,8 @@ public class DuccHandlerJsonFormat exten
// Size
sb = new StringBuffer();
sb.append("<span>");
- String size = duccwork.getSchedulingInfo().getShareMemorySize();
- MemoryUnits units = duccwork.getSchedulingInfo().getShareMemoryUnits();
+ String size = duccwork.getSchedulingInfo().getMemorySize();
+ MemoryUnits units = duccwork.getSchedulingInfo().getMemoryUnits();
sb.append(getProcessMemorySize(duccId,type,size,units));
sb.append("</span>");
row.add(new JsonPrimitive(sb.toString()));
@@ -1127,15 +1127,15 @@ public class DuccHandlerJsonFormat exten
// Class
col = new StringBuffer();
if(service.isPingOnly()) {
- String shareClass = ""+service.getShareClass();
- col.append("<span title=\""+shareClass+"\">");
- String shareType = "ping-only";
+ String schedulingClass = ""+service.getSchedulingClass();
+ col.append("<span title=\""+schedulingClass+"\">");
+ String serviceType = "ping-only";
col.append("<span>");
- col.append(shareType);
+ col.append(serviceType);
}
else {
- String shareClass = service.getShareClass();
- col.append(""+shareClass);
+ String schedulingClass = service.getSchedulingClass();
+ col.append(""+schedulingClass);
}
row.add(new JsonPrimitive(col.toString()));
// Pgin
@@ -1294,17 +1294,15 @@ public class DuccHandlerJsonFormat exten
JsonObject jsonResponse = new JsonObject();
JsonArray data = new JsonArray();
-
- int sumMemoryEffective = 0;
- int sumMemoryTotal = 0;
+ String hover;
+ int sumMemTotal = 0;
+ int sumMemFree = 0;
int sumSwapInuse = 0;
/*
int sumSwapDelta = 0;
*/
int sumSwapFree = 0;
int sumAliens = 0;
- int sumSharesTotal = 0;
- int sumSharesInuse = 0;
ListIterator<MachineFacts> listIterator;
JsonArray row;
@@ -1319,25 +1317,20 @@ public class DuccHandlerJsonFormat exten
while(listIterator.hasNext()) {
MachineFacts facts = listIterator.next();
try {
- sumMemoryEffective += Integer.parseInt(facts.memoryEffective);
- sumMemoryTotal += Integer.parseInt(facts.memoryTotal);
+ sumMemTotal += Integer.parseInt(facts.memTotal);
+ sumMemFree += Integer.parseInt(facts.memFree);
sumSwapInuse += Integer.parseInt(facts.swapInuse);
/*
sumSwapDelta += Integer.parseInt(facts.swapDelta);
*/
sumSwapFree += Integer.parseInt(facts.swapFree);
sumAliens += facts.aliens.size();
- sumSharesTotal += Integer.parseInt(facts.sharesTotal);
- sumSharesInuse += Integer.parseInt(facts.sharesInuse);
}
catch(Exception e) {
duccLogger.trace(methodName, jobid, e);
}
}
row = new JsonArray();
- // Release ALL Stuck JPs
- String releaseAll = buildReleaseAll(request, factsList);
- row.add(new JsonPrimitive(releaseAll));
// Status
row.add(new JsonPrimitive("Total"));
// IP
@@ -1345,9 +1338,9 @@ public class DuccHandlerJsonFormat exten
// Name
row.add(new JsonPrimitive(""));
// Memory: usable
- row.add(new JsonPrimitive(sumMemoryEffective));
- // Memory: total
- row.add(new JsonPrimitive(sumMemoryTotal));
+ hover = "title=\"total="+sumMemTotal+"\"";
+ String sumMemFreeWithHover = "<span "+hover+" >"+sumMemFree+"</span>";
+ row.add(new JsonPrimitive(sumMemFreeWithHover));
// Swap: inuse
row.add(new JsonPrimitive(sumSwapInuse));
/*
@@ -1360,10 +1353,6 @@ public class DuccHandlerJsonFormat exten
row.add(new JsonPrimitive(""));
// Alien PIDs
row.add(new JsonPrimitive(sumAliens));
- // Shares: total
- row.add(new JsonPrimitive(sumSharesTotal));
- // Shares:inuse
- row.add(new JsonPrimitive(sumSharesInuse));
// Heartbeat: last
row.add(new JsonPrimitive(""));
data.add(row);
@@ -1372,9 +1361,6 @@ public class DuccHandlerJsonFormat exten
while(listIterator.hasNext()) {
MachineFacts facts = listIterator.next();
row = new JsonArray();
- // Release Machine Stuck JPs
- String releaseMachine = buildReleaseMachine(request, facts);
- row.add(new JsonPrimitive(releaseMachine));
// Status
sb = new StringBuffer();
String status = facts.status;
@@ -1397,10 +1383,10 @@ public class DuccHandlerJsonFormat exten
// Name
row.add(new JsonPrimitive(facts.name));
// Memory: usable
- row.add(new JsonPrimitive(facts.memoryEffective));
- // Memory: total
if(!status.equals("defined")) {
- row.add(new JsonPrimitive(facts.memoryTotal));
+ hover = "title=\"total="+facts.memTotal+"\"";
+ String memFreeWithHover = "<span "+hover+" >"+facts.memFree+"</span>";
+ row.add(new JsonPrimitive(memFreeWithHover));
}
else {
row.add(new JsonPrimitive(""));
@@ -1488,40 +1474,6 @@ public class DuccHandlerJsonFormat exten
else {
row.add(new JsonPrimitive(""));
}
- // Shares
- int sharesTotal = 0;
- int sharesInuse = 0;
- try {
- int total = Integer.parseInt(facts.sharesTotal);
- int inuse = Integer.parseInt(facts.sharesInuse);
- sharesTotal = total;
- sharesInuse = inuse;
- }
- catch(Exception e) {
- }
- // Shares: total
- if(!status.equals("defined")) {
- row.add(new JsonPrimitive(facts.sharesTotal));
- }
- else {
- row.add(new JsonPrimitive(""));
- }
- // Shares: inuse
- sb = new StringBuffer();
- String span0 = "<span class=\"health_black\">";
- String span1 = "</span>";
- if(sharesInuse > sharesTotal) {
- span0 = "<span class=\"health_red\">";
- }
- sb.append(span0);
- sb.append(facts.sharesInuse);
- sb.append(span1);
- if(!status.equals("defined")) {
- row.add(new JsonPrimitive(sb.toString()));
- }
- else {
- row.add(new JsonPrimitive(""));
- }
// Heartbeat: last
if(!status.equals("defined")) {
row.add(new JsonPrimitive(facts.heartbeat));
@@ -2113,7 +2065,7 @@ public class DuccHandlerJsonFormat exten
userProcesses = DuccMachinesData.getInstance().getUserProcesses(reservation.getUniqueNodes(),user);
list = reservation.getNodes();
}
- String size = getProcessMemorySize(reservation.getDuccId(),"Reservation",reservation.getSchedulingInfo().getShareMemorySize(),reservation.getSchedulingInfo().getShareMemoryUnits());
+ String size = getProcessMemorySize(reservation.getDuccId(),"Reservation",reservation.getSchedulingInfo().getMemorySize(),reservation.getSchedulingInfo().getMemoryUnits());
String description = reservation.getStandardInfo().getDescription();
ReservationFacts facts = new ReservationFacts(id,start,end,user,rclass,state,reason,allocation,userProcesses,size,list,description);
factsList.add(facts);
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebProperties.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebProperties.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebProperties.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebProperties.java Wed Sep 9 19:19:20 2015
@@ -27,25 +27,6 @@ import java.util.Properties;
import org.apache.uima.ducc.common.utils.Utils;
public class DuccWebProperties {
-
- /*
- public static Properties properties = new Properties();
-
- public static String key_MaxRecordsJobs = "MaxRecordsJobs";
- public static String key_MaxRecordsReservations = "MaxRecordsReservations";
-
- static {
- properties.setProperty(key_MaxRecordsJobs, "12");
- properties.setProperty(key_MaxRecordsReservations, "5");
- }
-
- public static Properties instance() {
- return (Properties)properties.clone();
- }
- */
-
- public static String key_ducc_rm_share_quantum = "ducc.rm.share.quantum";
- public static String val_ducc_rm_share_quantum = "15";
private static String dir_home = Utils.findDuccHome();
private static String dir_resources = "resources";
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java Wed Sep 9 19:19:20 2015
@@ -190,7 +190,7 @@ public class NodeViz
String user = si.getUser();
String duccid = service_id == null ? Long.toString(w.getDuccId().getFriendly()) : service_id; // UIMA-4209
- int jobmem = Integer.parseInt(sti.getShareMemorySize());
+ int jobmem = Integer.parseInt(sti.getMemorySize());
String sclass = sti.getSchedulingClass();
int quantum = default_quantum;
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/VisualizedHost.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/VisualizedHost.java?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/VisualizedHost.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/VisualizedHost.java Wed Sep 9 19:19:20 2015
@@ -77,7 +77,8 @@ class VisualizedHost
this.name = NodeViz.strip(info.getName());
this.ip = info.getIp();
- String ns = info.getSharesTotal();
+ //TODO
+ String ns = "";
if ( ns == "" || ns == null ) {
this.mem = 0;
this.shares = 0;
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-job-details.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-job-details.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-job-details.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-job-details.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
</table>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-jobs.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-jobs.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-jobs.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-jobs.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
<tr>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-reservation-details.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-reservation-details.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-reservation-details.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-reservation-details.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
</table>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-reservations.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-reservations.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-reservations.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-reservations.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
<tr>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-service-details.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-service-details.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-service-details.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-service-details.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
</table>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-services.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-services.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-services.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-services.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
<tr>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-administration.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-system-administration.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-administration.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-administration.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
</table>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-broker.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-system-broker.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-broker.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-broker.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
</table>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-classes.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-system-classes.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-classes.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-classes.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
</table>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-daemons.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-system-daemons.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-daemons.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-daemons.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
</table>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-machines.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-system-machines.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-machines.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-system-machines.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
</table>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-viz.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/%24banner/c2-status-viz.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-viz.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/$banner/c2-status-viz.jsp Wed Sep 9 19:19:20 2015
@@ -25,7 +25,7 @@ under the License.
<td valign="top"><span class="timestamptitle" id="timestamp_area"></span>
</tr>
<tr>
-<td valign="top" align="right" title="The percentage of shares inuse">Utilization: 
+<td valign="top" align="right" title="The percentage of memory inuse">Utilization: 
<td valign="top"><span class="utilizationtitle" id="utilization_area">?</span>
</tr>
</table>
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/js/ducc.js Wed Sep 9 19:19:20 2015
@@ -1915,37 +1915,6 @@ function ducc_load_reservation_schedulin
}
}
-var wip_reservation_memory_sizes = false;
-
-function ducc_load_reservation_memory_sizes() {
- var fname = "ducc_load_reservation_memory_sizes";
- var data = null;
- if(wip_reservation_memory_sizes) {
- ducc_console_warn(fname+" already in progress...")
- return;
- }
- wip_reservation_memory_sizes = true;
- try {
- var servlet = "/ducc-servlet/reservation-memory-sizes";
- var tomsecs = ms_timeout;
- $.ajax({
- url: servlet,
- timeout: tomsecs
- }).done(function(data) {
- wip_reservation_memory_sizes = false;
- $("#memory_sizes_area").html(data);
- data = null;
- ducc_console_success(fname);
- }).fail(function(jqXHR, textStatus) {
- wip_reservation_memory_sizes = false;
- ducc_console_fail(fname, textStatus);
- });
- } catch (err) {
- wip_reservation_memory_sizes = false;
- ducc_error(fname, err);
- }
-}
-
var wip_reservation_memory_units = false;
function ducc_load_reservation_memory_units() {
@@ -2012,7 +1981,6 @@ function ducc_load_submit_reservation_da
var fname = "ducc_load_submit_reservation_data";
try {
ducc_load_reservation_scheduling_classes();
- ducc_load_reservation_memory_sizes();
ducc_load_reservation_memory_units();
ducc_load_reservation_submit_button();
ducc_load_common();
@@ -3377,49 +3345,8 @@ function ducc_block_jobs(id) {
return false;
}
-function ducc_release_shares(node, type) {
- var fname = "ducc_release_shares";
- try {
- $.jGrowl(" Pending release...");
- $.ajax({
- type: 'POST',
- url: "/ducc-servlet/release-shares-request" + "?node=" + node + "&" + "type=" + type,
- success: function(data) {
- $.jGrowl(data, {
- life: 6000
- });
- setTimeout(function() {
- window.close();
- }, 5000);
- }
- });
- setTimeout(function() {
- window.close();
- }, 5000);
- } catch (err) {
- ducc_error(fname, err);
- }
- return false;
-}
-
-function ducc_confirm_release_shares(node, type) {
- var fname = "ducc_confirm_release_shares";
- try {
- var machine = node;
- if (machine == "*") {
- machine = "ALL machines"
- }
- var result = confirm("Release " + type + " shares on " + machine + "?");
- if (result == true) {
- ducc_release_shares(node, type);
- }
- } catch (err) {
- ducc_error(fname, err);
- }
-}
-
function ducc_confirm_terminate_job(id) {
- var fname = "ducc_confirm_release_shares";
+ var fname = "ducc_confirm_terminate_job";
try {
var result = confirm("Terminate job " + id + "?");
if (result == true) {
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservations.jsp
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservations.jsp?rev=1702091&r1=1702090&r2=1702091&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservations.jsp (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/webapp/root/reservations.jsp Wed Sep 9 19:19:20 2015
@@ -114,9 +114,6 @@ if (table_style.equals("scroll")) {
<th title="The type of this reservation">Type</th>
<th title="The current state of this reservation">State</th>
<th title="The reason for the final state of this reservation, normally CanceledByUser">Reason</th>
- <!--
- <th title="The number of resources (machines or shares, depending on class) assigned to this reservation">Allocation</th>
- -->
<th title="The combined number of PIDs on the assigned resource(s) for user">User<br>Processes</th>
<th title="The memory allocation per resource for this reservation, in GB">Size</th>
<th title="The machine(s) assigned to this reservation">Host<br>Names</th>
@@ -148,9 +145,6 @@ if (table_style.equals("classic")) {
<th title="The type of this reservation">Type</th>
<th title="The current state of this reservation">State</th>
<th title="The reason for the final state of this reservation, normally CanceledByUser">Reason</th>
- <!--
- <th title="The number of resources (machines or shares, depending on class) assigned to this reservation">Allocation</th>
- -->
<th title="The combined number of PIDs on the assigned resource(s) for user">User<br>Processes</th>
<th title="The memory allocation per resource for this reservation, in GB">Size</th>
<th title="The machine(s) assigned to this reservation">Host<br>Names</th>