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

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

Definition at line 91 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::Svm().

00092 {
00093     ILOG_VAR(Util.FileCopyRemoteToLocal);
00094     IOBufferFile local(localFileName, false, false);
00095     if (!local.Valid())
00096     {
00097         ILOG_ERROR("Unable to open local : " << localFileName);
00098         return;
00099     }
00100     if (!remoteBuffer->Valid())
00101     {
00102         ILOG_ERROR("Invalid remoteBuffer : " << remoteBuffer);
00103         return;
00104     }
00105     int bufSize = Channel::DATA_BUFFER_SIZE - 100; // leave room for comm info
00106     char* buf = new char[bufSize];
00107     while (remoteBuffer->Available() > 0)
00108     {
00109         int nrRead = remoteBuffer->Read(buf, bufSize);
00110         local.Write(buf, nrRead);
00111     }
00112     delete buf;
00113 }

Here is the call graph for this function:


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