Reimplemented from Impala::Util::IOBuffer. Definition at line 188 of file IOBufferChannel.h. References Impala::Util::Channel::Buffer(), Impala::Util::Channel::DATA_BUFFER_SIZE, Impala::Util::IOBuffer::GetPosition(), Impala::Util::Channel::LastSendHadError(), mId, mMyChannel, Impala::Util::Channel::SendRequest(), and SetPosition(). Referenced by DoNativeTypeWrite(), Impala::Util::FileCopyLocalToRemote(), and Puts(). 00189 { 00190 char* chBuf = mMyChannel->Buffer(); 00191 Int64 nrWritten = 0; 00192 char* bufPtr = (char*) buf; 00193 while (nrWritten < bytesToWrite) 00194 { 00195 sprintf(chBuf, "writefilebuffer %d\0", mId); 00196 int used = strlen(chBuf) + 1; 00197 int nrData = Min<Int64>(Channel::DATA_BUFFER_SIZE - used, 00198 bytesToWrite - nrWritten); 00199 memcpy(chBuf + used, bufPtr + nrWritten, nrData); 00200 int len = mMyChannel->SendRequest(used + nrData); 00201 if (mMyChannel->LastSendHadError()) 00202 break; 00203 nrWritten += nrData; 00204 } 00205 SetPosition(GetPosition() + bytesToWrite); 00206 }
Here is the call graph for this function:
|