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/05/05 15:09:55 UTC
svn commit: r1677818 -
/uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java
Author: degenaro
Date: Tue May 5 13:09:55 2015
New Revision: 1677818
URL: http://svn.apache.org/r1677818
Log:
UIMA-4372 DUCC Reservations will hang with no user messages if resources are unavailable
Modified:
uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java?rev=1677818&r1=1677817&r2=1677818&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-orchestrator/src/main/java/org/apache/uima/ducc/orchestrator/OrchestratorComponent.java Tue May 5 13:09:55 2015
@@ -804,20 +804,21 @@ implements Orchestrator {
// state: WaitingForResources
duccWorkReservation.stateChange(ReservationState.WaitingForResources);
OrchestratorCheckpoint.getInstance().saveState();
- int counter = 0;
- while(duccWorkReservation.isPending()) {
- counter++;
- if(counter > 5) {
- counter = 0;
- logger.info(methodName, duccWorkReservation.getDuccId(), "waiting for allocation...");
+ if(duccWorkReservation.isWaitForAssignment()) {
+ int counter = 0;
+ while(duccWorkReservation.isPending()) {
+ counter++;
+ if(counter > 5) {
+ counter = 0;
+ logger.info(methodName, duccWorkReservation.getDuccId(), "waiting for allocation...");
+ }
+ Thread.sleep(1000);
+ }
+ try {
+ properties.put(ReservationReplyProperties.key_message, duccWorkReservation.getCompletionRationale().getText());
+ }
+ catch(Throwable t) {
}
- Thread.sleep(1000);
- }
- // prepare for reply to submitter
- try {
- properties.put(ReservationReplyProperties.key_message, duccWorkReservation.getCompletionRationale().getText());
- }
- catch(Throwable t) {
}
properties.put(ReservationRequestProperties.key_id, duccWorkReservation.getId());
// node list
@@ -844,8 +845,6 @@ implements Orchestrator {
logger.error(methodName, null, messages.fetch("TODO")+" prepare error reply",e);
//TODO
}
-
-
logger.trace(methodName, null, messages.fetch("exit"));
return;
}