Esempio n. 1
0
        private void AddHomeDirectory()
        {
            bool isHomeDirectory = HdfsClient.ListStatus(path: GetRootPath).Result.SingleOrDefault(a => a.Name == GetHomeDirectoryName) != null;

            if (isHomeDirectory)
            {
                bool result = HdfsClient.MakeDirectory(GetHomeDirectoryPath).Result;
                if (!result)
                {
                    throw new Exception($"Problem add home directory {GetHomeDirectoryPath}");
                }
            }
        }
Esempio n. 2
0
        private void AddDeweyRoot()
        {
            bool isRoot = HdfsClient.ListStatus("/").Result.SingleOrDefault(a => a.Name == GetRootName) != null;

            if (isRoot)
            {
                bool result = HdfsClient.MakeDirectory(GetRootPath).Result;
                if (!result)
                {
                    throw new Exception($"Problem add  root {GetRootPath}");
                }
            }
        }