ADLS 인증에 C#을 사용하고 있으며 삭제, 이름 바꾸기와 같은 파일 작업을 수행하려고합니다. 작동 내가 AdlsError을 얻고있다Azure - ADLS 파일을 삭제하는 동안 ADlsError/WebHDFS 오류가 발생했습니다.
var context = new AuthenticationContext("https://login.windows.net/" + tenantId);
ClientCredential clientCredential = new ClientCredential(appId, secretKey);
var tokenResponse = context.AcquireTokenAsync("https://management.azure.com/", clientCredential).Result;
var accessToken = tokenResponse.AccessToken;
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + accessToken);
client.BaseAddress = new Uri("https://management.azure.com/");
}
ServiceClientCredentials creds = new TokenCredentials(tokenResponse.AccessToken);// tokenResponse.IdToken, tokenResponse.AccessTokenType);
DataLakeStoreFileSystemManagementClient _adlsFileSystemClient = new DataLakeStoreFileSystemManagementClient(creds);
_adlsFileSystemClient.FileSystem.Delete(_adlsAccountName, FilenameWPath);
, 유형의
처리되지 않은 예외가 인증 코드 아래 사용 및 삭제 'Microsoft.Azure.Management.DataLake.Store.Models.AdlsErrorException' 가 발생 ConsoleApplication1.exe
즉, WebHDFS를 사용하도록 설정해야합니까? ADLS에서 webHDFS를 사용하는 방법. HDInight를 검사했는데 webHDFS가 활성화되었습니다.
알려주십시오.이 문제를 어떻게 해결할 수 있습니까?
저는 "데이터 레이크 애널리틱스 개발자"역할로서의 역할을 추가했으며 모든 것이 잘 작동합니다 ... 노력해 주셔서 감사합니다. http://stackoverflow.com/questions/41330565/u-sql-error-while-using-reference-assembly?noredirect=1에서 나를 도울 수 있습니까? – Ajay