Definition at line 58 of file ChannelProxy.h.
References Impala::Util::Channel::Buffer(), ChannelIsValid(), ILOG_DEBUG, ILOG_ERROR, Impala::Util::ChannelPool::Instance(), mChannel, mPort, mServer, Impala::Util::ChannelPool::Remove(), and Impala::Util::Channel::SendRequest().
Referenced by Impala::Core::IDash::Client::DeleteCases(), Impala::Core::IDash::Client::GetJobs(), Impala::Core::VideoJob::ServerProxy::GetJobState(), Impala::Core::VideoJob::ServerProxy::MonitorJobState(), Impala::Job::Runner::PoisonServer(), Impala::Job::Runner::RunJob(), Impala::Core::VideoJob::ServerProxy::ScheduleJob(), Impala::Core::IDash::Client::ScheduleJob(), Impala::Core::IDash::Client::StatusJob(), Impala::Job::Runner::StopServer(), and Impala::Job::Runner::WaitForJob().
00059 {
00060 if (!ChannelIsValid())
00061 {
00062 ILOG_ERROR("Invalid channel, cannot send");
00063 return "ERROR";
00064 }
00065
00066 ILOG_DEBUG("Sending: " << msg);
00067
00068 char* buf = mChannel->Buffer();
00069 sprintf(buf, "%s\0", msg.c_str());
00070 int len = mChannel->SendRequest(strlen(buf) + 1);
00071
00072 if (len < 0)
00073 {
00074 ILOG_ERROR("Send failed (" << len << "); closing channel");
00075 ChannelPool::Instance().Remove(mServer, mPort);
00076 mChannel = 0;
00077 return "ERROR: 503: Send failed; closing channel";
00078 }
00079
00080 buf[len] = 0;
00081 ILOG_DEBUG("Response: " << buf);
00082 return String(buf);
00083 }
Here is the call graph for this function: