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

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

Definition at line 286 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().

00287     {
00288         CmdOptions& options = CmdOptions::GetInstance();
00289         mDataString = StringReplaceAll(options.GetString("data"), ":", ";", false);
00290         ILOG_DEBUG("'data' option externally specified: " << mDataString);
00291         String additionalData = options.GetString("data::"+setName, "");
00292         if (additionalData.empty() && !setName.empty())
00293             additionalData = "../" + FileNameBase(setName);
00294         if (!additionalData.empty())
00295         {
00296             mDataString = additionalData + ";" + mDataString;
00297             ILOG_INFO_HEADNODE("'data' option for " << setName <<
00298                            " has been extended: " << mDataString);
00299         }
00300         mData = StringList(mDataString, ';');
00301         mDataServer = options.GetString("dataServer");
00302         String replaceDataServer = options.GetString("dataServer::"+setName, "");
00303         if (!replaceDataServer.empty())
00304         {
00305             mDataServer = replaceDataServer;
00306             ILOG_INFO_HEADNODE("server for " << setName << " is " << mDataServer);
00307         }
00308         mDataChannel = 0;
00309         if (!mDataServer.empty())
00310         {
00311             ILOG_INFO_HEADNODE("Retrieving channel to server " << mDataServer);
00312             String passFile = options.GetString("passwordFile");
00313             mDataChannel = ChannelPool::Instance().Get(mDataServer, passFile);
00314         }
00315         mOverride = options.GetBool("override");
00316 #ifdef WIN32
00317         // printf("%d\n", _getmaxstdio()); // normally 512
00318         _setmaxstdio(2048); // set it to the absolute maximum
00319 #endif
00320 #ifdef unix
00321         rlimit lim;
00322         getrlimit(RLIMIT_NOFILE, &lim);
00323         lim.rlim_cur = 2048; // will succeed on image, down to 1024(?) on linux
00324         setrlimit(RLIMIT_NOFILE, &lim);
00325 #endif
00326     }

Here is the call graph for this function:


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