Definition at line 24 of file IOBufferChannel.h. References Impala::Util::Channel::Buffer(), Impala::Util::ChannelPool::Get(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetString(), ILOG_DEBUG, ILOG_ERROR, Impala::Util::ChannelPool::Instance(), Impala::Util::Channel::LastSendHadError(), mId, mMyChannel, mReadMode, Impala::Util::Channel::SendRequest(), and Impala::Util::IOBuffer::SetSize(). 00025 { 00026 mReadMode = readMode; 00027 mId = -1; 00028 if (channel == 0) 00029 { 00030 CmdOptions& options = CmdOptions::GetInstance(); 00031 String dataServer = options.GetString("dataServer"); 00032 String passwordFile = options.GetString("passwordFile"); 00033 channel = ChannelPool::Instance().Get(dataServer, passwordFile); 00034 } 00035 mMyChannel = channel; 00036 char* buf = mMyChannel->Buffer(); 00037 sprintf(buf, "openfilebuffer \"%s\" %d\0", fileName.c_str(), readMode); 00038 mMyChannel->SendRequest(strlen(buf)+1); 00039 if (mMyChannel->LastSendHadError()) 00040 { 00041 ILOG_ERROR("Failed to open " << fileName); 00042 return; 00043 } 00044 Int64 bufSize; 00045 sscanf(buf, "%d %lld", &mId, &bufSize); 00046 if (mReadMode) 00047 { 00048 SetSize(bufSize); 00049 ILOG_DEBUG(fileName << ", id = " << mId << ", size = " << bufSize); 00050 } 00051 else 00052 { 00053 ILOG_DEBUG(fileName << ", id = " << mId); 00054 } 00055 }
Here is the call graph for this function:
|