Definition at line 46 of file mainDataTransfer.cpp. References Impala::Util::IOBuffer::AvailableInt32(), BUF_SIZE, Impala::Util::Database::GetInstance(), Impala::Util::Database::GetIOBuffer(), ILOG_INFO, ILOG_VAR, Impala::Util::IOBuffer::Read(), and Impala::Util::IOBuffer::Write(). Referenced by mainDataTransfer(). 00047 { 00048 ILOG_VAR(Impala.Application.DataTransfer.TransferServerToLocal); 00049 00050 // copy local file to its final destination 00051 Util::IOBuffer* destination = new Util::IOBufferFile(localFilename, false, false); 00052 Impala::Util::Database& database(Impala::Util::Database::GetInstance()); 00053 Util::IOBuffer* server = database.GetIOBuffer(serverFilename, true, false, ""); 00054 ILOG_INFO("File to copy from dataserver has " << server->AvailableInt32() << " bytes"); 00055 static unsigned char buffer[BUF_SIZE]; 00056 while(true) 00057 { 00058 int bytesread = server->Read(buffer, BUF_SIZE); 00059 if(bytesread == 0) break; 00060 destination->Write(buffer, bytesread); 00061 } 00062 delete server; 00063 delete destination; 00064 }
Here is the call graph for this function:
|