Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Util::FileCopyRemoteToLocal ( std::string  remoteFileName,
std::string  localFileName 
) [inline]

Definition at line 65 of file FileCopy.h.

References Impala::Util::IOBuffer::Available(), Impala::Util::Channel::DATA_BUFFER_SIZE, ILOG_ERROR, ILOG_VAR, Impala::Util::IOBufferChannel::Read(), Impala::Util::IOBufferChannel::Valid(), Impala::Util::IOBufferFile::Valid(), and Impala::Util::IOBufferFile::Write().

00066 {
00067     ILOG_VAR(Util.FileCopyRemoteToLocal);
00068     IOBufferFile local(localFileName, false, false);
00069     if (!local.Valid())
00070     {
00071         ILOG_ERROR("Unable to open local : " << localFileName);
00072         return;
00073     }
00074     IOBufferChannel remote(remoteFileName, true);
00075     if (!remote.Valid())
00076     {
00077         ILOG_ERROR("Unable to open remote : " << remoteFileName);
00078         return;
00079     }
00080     int bufSize = Channel::DATA_BUFFER_SIZE - 100; // leave room for comm info
00081     char* buf = new char[bufSize];
00082     while (remote.Available() > 0)
00083     {
00084         int nrRead = remote.Read(buf, bufSize);
00085         local.Write(buf, nrRead);
00086     }
00087     delete buf;
00088 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:24:05 2011 for ImpalaSrc by  doxygen 1.5.1