Path srcPidPath = null;
Path dstPidPath = null;
int idleLoopCount = 0;
try {
while (true) {
JvmTask myTask = umbilical.getTask(jvmId);
if (myTask.shouldDie()) {
break;
} else {
if (myTask.getTask() == null) {
taskid = null;
if (++idleLoopCount >= SLEEP_LONGER_COUNT) {
//we sleep for a bigger interval when we don't receive
//tasks for a while
Thread.sleep(1500);
} else {
Thread.sleep(500);
}
continue;
}
}
idleLoopCount = 0;
Task task = myTask.getTask();
taskid = task.getTaskID();
//create the index file so that the log files
//are viewable immediately
TaskLog.syncLogs(firstTaskid, taskid);