예제 #1
0
        /// <summary>
        /// Convert syms path to corpus path.
        /// </summary>
        public static string SymsPathToCorpusPath(string symsPath, StorageManager strgMgr)
        {
            var    adlsPath   = Utils.SymsPathToAdlsAdapterPath(symsPath);
            string corpusPath = strgMgr.AdapterPathToCorpusPath(adlsPath);

            if (corpusPath == null)
            {
                Tuple <string, string> pathTuple = Utils.CreateAndMountAdlsAdapterFromAdlsPath(strgMgr, adlsPath);
                if (pathTuple == null)
                {
                    throw new Exception($"Couldn't found adls adapter which can map to adls path : '{adlsPath}'. " +
                                        $"Path recieved from syms : { symsPath }. Tried to generate new adls adapter but failed.");
                }

                //Try again
                corpusPath = strgMgr.AdapterPathToCorpusPath(adlsPath);
            }
            return(corpusPath);
        }