Definition at line 63 of file RepositoryInFileSystem.h. References Impala::FileNameBase(), Impala::Persistency::Locator::GetDataSet(), Impala::Persistency::Locator::GetHost(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetString(), mMap, Impala::StringReplaceAll(), and Impala::Persistency::Locator::ToString(). Referenced by GetFile(). 00064 { 00065 FileSystem* fs = 0; 00066 if (mMap.Get(loc.ToString(), fs)) 00067 return fs; 00068 00069 String setName = loc.GetDataSet(); 00070 String data(""); 00071 if ((setName == "dot") || (setName == ".")) 00072 { 00073 data = "."; 00074 ILOG_INFO_ONCE("'data' option for " << setName << 00075 " has been set to: " << data); 00076 } 00077 else if (setName == "abs") 00078 { 00079 data = ""; 00080 ILOG_INFO_ONCE("'data' option for " << setName << 00081 " has been set to: <empty> (i.e. is absolute)"); 00082 } 00083 else if (setName == "config") 00084 { 00085 char* ptr = getenv("IMPALAROOT"); 00086 data = (ptr) ? String(ptr)+"/src/" : "."; 00087 ILOG_INFO_ONCE("'data' option for " << setName << 00088 " has been set to: " << data); 00089 } 00090 else 00091 { 00092 CmdOptions& options = CmdOptions::GetInstance(); 00093 data = StringReplaceAll(options.GetString("data"), ":", ";", false); 00094 String additionalData = options.GetString("data::"+setName, ""); 00095 if (additionalData.empty() && !setName.empty()) 00096 additionalData = "../" + FileNameBase(setName); 00097 if (!additionalData.empty()) 00098 { 00099 data = additionalData + ";" + data; 00100 ILOG_INFO_ONCE("'data' option for " << setName << 00101 " has been extended: " << data); 00102 } 00103 } 00104 00105 fs = new FileSystem(data, loc.GetHost()); 00106 mMap.Add(loc.ToString(), fs); 00107 return fs; 00108 }
Here is the call graph for this function:
|