Tag: hdfs

如何使用c#validationWebHDFS

我一直在尝试使用WebHDFS REST API将使用c#的文件上传到Hadoop。 这段代码工作正常: using (var client = new System.Net.WebClient()) { string result = client.DownloadString(“http:/ /host:50070/webhdfs/v1/user/myuser/?op=LISTSTATUS”); client.DownloadFile(“http:/ /host:50070/webhdfs/v1/user/myuser/tbible.txt?user.name=myuser&op=OPEN”,”d:\tbible.txt”); } 此代码获得403 Forbidden: using (var client = new System.Net.WebClient()) { client.UploadFile(“http:/ /host:50070/webhdfs/v1/user/myuser/?user.name=myuser&op=CREATE”, “PUT”, “d:\bible.txt”); } 我试过添加一个网络凭证,没有运气。 如何从.NETvalidation我们的群集? 群集是RHEL5上的Hortonworks HDP1.3。 (这篇文章中的额外空格是保持http://不作为链接)另外,我本来想使用微软的hadoop SDK,但它是alpha并且不会在我的环境中编译:(