Definition at line 427 of file Server.h. References Impala::Util::ChannelServer::FirstPort(), ILOG_INFO, ILOG_WARN, Impala::Job::State::KILL_ATTEMPT, Impala::MakeString(), mJobByPort, mJobsWaiting, and Impala::Util::ChannelServer::NrOfPorts(). Referenced by HandleDisconnect(). 00428 { 00429 CString logInformation = "Job source at port " + MakeString(srcPort) + 00430 " disconnected; removing its jobs"; 00431 bool loggedInformational = false; 00432 00433 std::deque<Job*>::iterator iter = mJobsWaiting.begin(); 00434 while (iter != mJobsWaiting.end()) 00435 { 00436 if ((*iter)->srcPort == srcPort) 00437 { 00438 if (!loggedInformational) 00439 ILOG_WARN(logInformation); 00440 loggedInformational = true; 00441 00442 ILOG_INFO("Removed pending job " << (*iter)->id << 00443 " accepted at port " << srcPort); 00444 delete *iter; 00445 iter = mJobsWaiting.erase(iter); 00446 } 00447 else 00448 { 00449 iter++; 00450 } 00451 } 00452 00453 int maxPort = FirstPort() + NrOfPorts() - 1; 00454 for (int port = (FirstPort() + 1); port <= maxPort; port++) 00455 { 00456 Job* job = mJobByPort[port]; 00457 if (job && job->srcPort == srcPort) 00458 { 00459 if (!loggedInformational) 00460 ILOG_WARN(logInformation); 00461 loggedInformational = true; 00462 00463 ILOG_INFO("Requesting to kill job " << job->id << " run by " 00464 << job->agent << " at port " << port); 00465 job->state = State::KILL_ATTEMPT; 00466 } 00467 } 00468 }
Here is the call graph for this function:
|