Permalink
Browse files

changed the error wording a bit for Bug 7015; brought some code in un…

…der 80 chars
  • Loading branch information...
1 parent d55f59a commit e8939b9f457dc97f8991331d570983f7e291252b @timf timf committed Jun 8, 2010
@@ -340,7 +340,6 @@ private static void netFilter(List<ResourcepoolEntry> okNodes,
* @param lager logging switches
* @param vmid for logging
* @param greedy true if VMs should stack up on VMMs first, false if round robin
- * @param preemptable indicates if the space can be pre-empted by higher priority reservations
* @return node name can not be null
* @throws ResourceRequestDeniedException exc
* @throws WorkspaceDatabaseException exc
@@ -369,7 +368,8 @@ static String getResourcePoolEntryImproved(int mem,
}
//availableEntries is never empty
- final List<ResourcepoolEntry> availableEntries = getAvailableEntries(mem, neededAssociations, db, trace);
+ final List<ResourcepoolEntry> availableEntries =
+ getAvailableEntries(mem, neededAssociations, db, trace);
if (trace) {
traceAvailableEntries(availableEntries);
@@ -401,18 +401,19 @@ static String getResourcePoolEntryImproved(int mem,
final boolean trace) throws WorkspaceDatabaseException,
ResourceRequestDeniedException {
- final List<ResourcepoolEntry> availableEntries = db.getAvailableEntriesSortedByFreeMemoryPercentage(mem);
+ final List<ResourcepoolEntry> availableEntries =
+ db.getAvailableEntriesSortedByFreeMemoryPercentage(mem);
if(availableEntries.isEmpty()){
- String err = "No resource pool with available memory for this request.";
+ String err = "No resource is available for this request (based on memory).";
logger.error(err);
throw new ResourceRequestDeniedException(err);
}
netFilter(availableEntries, neededAssociations, trace);
if(availableEntries.isEmpty()){
- String err = "No resource pool with requested network associations.";
+ String err = "No resource can support the requested network(s).";
logger.error(err);
throw new ResourceRequestDeniedException(err);
}
@@ -428,7 +429,10 @@ private static void traceAvailableEntries(final List<ResourcepoolEntry> availabl
}
}
- private static void traceLookingForResource(int mem, String[] neededAssociations, boolean greedy) {
+ private static void traceLookingForResource(int mem,
+ String[] neededAssociations,
+ boolean greedy) {
+
final StringBuilder buf =
new StringBuilder("Looking for resource. Mem = ");

0 comments on commit e8939b9

Please sign in to comment.