Definition at line 40 of file FileCopy.h. References Impala::Util::IOBuffer::Available(), Impala::Util::Channel::DATA_BUFFER_SIZE, ILOG_ERROR, ILOG_VAR, Impala::Util::IOBufferFile::Read(), Impala::Util::IOBuffer::Valid(), Impala::Util::IOBufferFile::Valid(), and Impala::Util::IOBuffer::Write(). 00041 { 00042 ILOG_VAR(Util.FileCopyLocalToRemote); 00043 IOBufferFile local(localFileName, true, false); 00044 if (!local.Valid()) 00045 { 00046 ILOG_ERROR("Unable to open local : " << localFileName); 00047 return; 00048 } 00049 if (!remoteBuffer->Valid()) 00050 { 00051 ILOG_ERROR("Invalid remote buffer : " << remoteBuffer); 00052 return; 00053 } 00054 int bufSize = Channel::DATA_BUFFER_SIZE - 100; // leave room for comm info 00055 char* buf = new char[bufSize]; 00056 while (local.Available() > 0) 00057 { 00058 int nrRead = local.Read(buf, bufSize); 00059 remoteBuffer->Write(buf, nrRead); 00060 } 00061 delete buf; 00062 }
Here is the call graph for this function: ![]()
|