使用 Azure Data Lake Storage Gen2 URIUse the Azure Data Lake Storage Gen2 URI

通过方案标识符 abfs(Azure Blob 文件系统)可以知道与 Azure Data Lake Storage Gen2 兼容的 Hadoop 文件系统驱动程序。The Hadoop Filesystem driver that is compatible with Azure Data Lake Storage Gen2 is known by its scheme identifier abfs (Azure Blob File System). 与其他 Hadoop 文件系统驱动程序一样,ABFS 驱动程序使用 URI 格式寻址支持 Data Lake Storage Gen2 的帐户中的文件和目录。Consistent with other Hadoop Filesystem drivers, the ABFS driver employs a URI format to address files and directories within a Data Lake Storage Gen2 capable account.

URI 语法URI syntax

Data Lake Storage Gen2 的 URI 语法依赖于存储帐户是否设置为将 Data Lake Storage Gen2 设为默认文件系统。The URI syntax for Data Lake Storage Gen2 is dependent on whether or not your storage account is set up to have Data Lake Storage Gen2 as the default file system.

如果希望寻址的支持 Data Lake Storage Gen2 的帐户在帐户创建期间设为默认文件系统,则简写 URI 语法为:If the Data Lake Storage Gen2 capable account you wish to address is not set as the default file system during account creation, then the shorthand URI syntax is:

abfs[s]1://<file_system>2@<account_name>3.dfs.core.chinacloudapi.cn/<path>4/<file_name>5
  1. 方案标识符abfs 协议用作方案标识符。Scheme identifier: The abfs protocol is used as the scheme identifier. 你可以选择使用或不是用传输层安全性 (TLS)(旧称为“安全套接字层 (SSL)”)连接进行连接。You have the option to connect with or without a Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), connection. 使用 abfss 通过 TLS 连接进行连接。Use abfss to connect with a TLS connection.

  2. 文件系统:保存文件和文件夹的父位置。File system: The parent location that holds the files and folders. 这与 Azure 存储 Blob 服务中的“容器”相同。This is the same as Containers in the Azure Storage Blobs service.

  3. 帐户名称:创建期间为存储帐户提供的名称。Account name: The name given to your storage account during creation.

  4. 路径:目录结构采用正斜杠分隔 (/) 表示形式。Paths: A forward slash delimited (/) representation of the directory structure.

  5. 文件名:单个文件的名称。File name: The name of the individual file. 如果对目录寻址,则此参数是可选的。This parameter is optional if you are addressing a directory.

但是,如果希望寻址的帐户在帐户创建期间设为默认文件系统,则简写 URI 语法为:However, if the account you wish to address is set as the default file system during account creation, then the shorthand URI syntax is:

/<path>1/<file_name>2
  1. 路径:目录结构采用正斜杠分隔 (/) 表示形式。Path: A forward slash delimited (/) representation of the directory structure.

  2. 文件名:单个文件的名称。File Name: The name of the individual file.

后续步骤Next steps