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

void Impala::Util::Database::Init ( String  setName  )  [inline, private]

Definition at line 269 of file Database.h.

References Impala::FileNameBase(), Impala::Util::ChannelPool::Get(), Impala::CmdOptions::GetBool(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetString(), ILOG_DEBUG, Impala::Util::ChannelPool::Instance(), mData, mDataChannel, mDataServer, mDataString, mOverride, and Impala::StringReplaceAll().

Referenced by Database().

00270     {
00271         CmdOptions& options = CmdOptions::GetInstance();
00272         mDataString = StringReplaceAll(options.GetString("data"), ":", ";", false);
00273         ILOG_DEBUG("'data' option externally specified: " << mDataString);
00274         String additionalData = options.GetString("data::"+setName, "");
00275         if (additionalData.empty() && !setName.empty())
00276             additionalData = "../" + FileNameBase(setName);
00277         if (!additionalData.empty())
00278         {
00279             mDataString = additionalData + ";" + mDataString;
00280             ILOG_INFO_ONCE("'data' option for " << setName <<
00281                            " has been extended: " << mDataString);
00282         }
00283         mData = StringList(mDataString, ';');
00284         mDataServer = options.GetString("dataServer");
00285         String replaceDataServer = options.GetString("dataServer::"+setName, "");
00286         if (!replaceDataServer.empty())
00287         {
00288             mDataServer = replaceDataServer;
00289             ILOG_INFO_ONCE("server for " << setName << " is " << mDataServer);
00290         }
00291         mDataChannel = 0;
00292         if (!mDataServer.empty())
00293         {
00294             ILOG_INFO_ONCE("Retrieving channel to server " << mDataServer);
00295             String passFile = options.GetString("passwordFile");
00296             mDataChannel = ChannelPool::Instance().Get(mDataServer, passFile);
00297         }
00298         mOverride = options.GetBool("override");
00299 #ifdef WIN32
00300         // printf("%d\n", _getmaxstdio()); // normally 512
00301         _setmaxstdio(2048); // set it to the absolute maximum
00302 #endif
00303 #ifdef unix
00304         rlimit lim;
00305         getrlimit(RLIMIT_NOFILE, &lim);
00306         lim.rlim_cur = 2048; // will succeed on image, down to 1024(?) on linux
00307         setrlimit(RLIMIT_NOFILE, &lim);
00308 #endif
00309     }

Here is the call graph for this function:


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