Fixing : Experiments with overridden resource allocation details tries to use qos and reservation from community user
@@ -641,15 +641,21 @@ public class ProcessContext {
}
public String getAllocationProjectNumber() {
+ if (isUseUserCRPref() &&
+ userComputeResourcePreference != null &&
+ userComputeResourcePreference.getAllocationProjectNumber() != null) {
+ return userComputeResourcePreference.getAllocationProjectNumber();
+ } else {
return gatewayComputeResourcePreference.getAllocationProjectNumber();
}
+ }
public String getReservation() {
long start = 0, end = 0;
String reservation = null;
if (isUseUserCRPref() &&
userComputeResourcePreference != null &&
- isValid(userComputeResourcePreference.getReservation())) {
+ userComputeResourcePreference.getReservation() != null) {
reservation = userComputeResourcePreference.getReservation();
start = userComputeResourcePreference.getReservationStartTime();
end = userComputeResourcePreference.getReservationEndTime();
@@ -670,7 +676,7 @@ public class ProcessContext {
public String getQualityOfService() {
if (isUseUserCRPref() &&
userComputeResourcePreference != null &&
- isValid(userComputeResourcePreference.getQualityOfService())) {
+ userComputeResourcePreference.getQualityOfService() != null) {
return userComputeResourcePreference.getQualityOfService();
} else {
return gatewayComputeResourcePreference.getQualityOfService();
@@ -681,7 +687,7 @@ public class ProcessContext {
public String getQueueName() {
if (isUseUserCRPref() &&
userComputeResourcePreference != null &&
- isValid(userComputeResourcePreference.getPreferredBatchQueue())) {
+ userComputeResourcePreference.getPreferredBatchQueue() != null) {
return userComputeResourcePreference.getPreferredBatchQueue();
} else if (isValid(processModel.getProcessResourceSchedule().getQueueName())) {
return processModel.getProcessResourceSchedule().getQueueName();
