I try to list the name of the folder using webhdfs in C#. URL working fine using curl in sandbox but not in C# in my laptop
Error Message- SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Code:
static void Main(string[] args)
{
Uri myUri = new Uri("http://hostname:50070/webhdfs/v1/user/hive/warehouse");
string userName = "myuser";
WebHDFSClient hdfsClient = new WebHDFSClient(myUri, userName);
string strDirectoryPath= "/user/hive/warehouse";
ArrayList l = new ArrayList();
l.Add(hdfsClient.GetDirectoryStatus(
strDirectoryPath).Result.Directories);
}
few issues: