template<class ArrayT>
Definition at line 253 of file WriteRaw.h. References Impala::Util::DatabaseWriteNative(), Impala::Util::Database::GetIOBuffer(), ILOG_ERROR, ILOG_VAR, and WriteRawListVar(). 00255 { 00256 ILOG_VAR(Impala.Core.Array.WriteRawListVar); 00257 //Util::IOBuffer* buf = db->GetIOBuffer(fileName, false, false, "tmp"); 00258 Util::IOBuffer* buf = db->GetIOBuffer(fileName, false, false, "tmp", 0, true); 00259 if (!buf) 00260 return; 00261 00262 WriteRawListVar(list, buf, binary); 00263 delete buf; 00264 00265 if (!writeIndex) 00266 return; 00267 if (!binary) 00268 { 00269 ILOG_ERROR("Cannot write index for non-binary files"); 00270 return; 00271 } 00272 00273 size_t storSize = sizeof(typename ArrayT::StorType); 00274 Int64 elemSize = ArrayT::ElemSize(); 00275 std::vector<Int64> v; 00276 Int64 pos = 200; 00277 for (Int64 i=0 ; i<list.size() ; i++) 00278 { 00279 v.push_back(pos); 00280 pos += 20 + storSize * list[i]->CW() * list[i]->CH() * elemSize; 00281 } 00282 Util::DatabaseWriteNative(fileName + ".idx", db, v.begin(), v.end()); 00283 }
Here is the call graph for this function:
|