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

void Impala::Util::FileCopyRemoteToLocal ( IOBuffer *  remoteBuffer,
std::string  localFileName 
) [inline]

Definition at line 66 of file FileCopy.h.

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

Referenced by Impala::Core::Training::Svm::LoadModel(), and Impala::Core::Training::Fisher::LoadModel().

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

Here is the call graph for this function:


Generated on Fri Mar 19 11:39:07 2010 for ImpalaSrc by  doxygen 1.5.1