【问题标题】:What is clientId, authTokenEndpoint, clientKey for accessing Azure Data Lake?访问 Azure Data Lake 的客户端 ID、authToken Endpoint、客户端密钥是什么?
【发布时间】:2019-05-28 19:40:00
【问题描述】:

我正在编写一个测试应用程序来从 AzureData Lake 读取文件。我已经创建了帐户和资源,并上传了文件。我正在尝试使用以下代码创建客户端(如文档https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-get-started-java-sdk 中所述)。我从哪里得到这些值? 谢谢

String clientId = "FILL-IN-HERE";
String authTokenEndpoint = "FILL-IN-HERE";
String clientKey = "FILL-IN-HERE";

AccessTokenProvider provider = new ClientCredsTokenProvider(authTokenEndpoint, clientId, clientKey);
// full account FQDN, not just the account name
String accountFQDN = "FILL-IN-HERE";
ADLStoreClient client = ADLStoreClient.createClient(accountFQDN, provider);

【问题讨论】:

    标签: java azure azure-data-lake


    【解决方案1】:

    您似乎正在将 Azure Active Directory authentication 与 Azure Data Lake 一起使用。

    登录 Azure 门户->单击 Azure Active Directory->单击应用注册->找到您的应用程序(或创建一个新应用程序)

    客户 ID

    clientKey(点击Certificates&secrets->点击new client secret->点击add)client secret就是clientKey。

    authTokenEndpoint点击端点

    请参阅此document 了解更多详情。

    【讨论】: