更新时间:2023-12-25 GMT+08:00
分享

HDFS连接

介绍

通过HDFS连接,可以对MRS、FusionInsight HD或开源Hadoop的HDFS抽取、加载文件,支持CSV、Parquet和二进制格式。

连接样例

{
    "links": [
        {
            "link-config-values": {
                "configs": [
                    {
                        "inputs": [
                            {
                                "name": "linkConfig.hadoopType",
                                "value": "FusionInsight HD"
                            },
                            {
                                "name": "linkConfig.host",
                                "value": "10.120.205.143"
                            },
                            {
                                "name": "linkConfig.casPort",
                                "value": "20009"
                            },
                            {
                                "name": "linkConfig.port",
                                "value": "28443"
                            },
                            {
                                "name": "linkConfig.authType",
                                "value": "KERBEROS"
                            },
                            {
                                "name": "linkConfig.user",
                                "value": "admin"
                            },
                            {
                                "name": "linkConfig.password",
                                "value": "Add password here"
                            },
                            {
                                "name": "linkConfig.runMode",
                                "value": "STANDALONE"
                            }
                        ],
                        "name": "linkConfig"
                    }
                ]
            },
            "name": "hdfslink",
            "connector-name": "hdfs-connector"
        }
    ]
}

连接参数

参数

是否必选

类型

说明

linkConfig.hadoopType

枚举

Hadoop类型:

  • MRS:表示连接MRS的HDFS。
  • FusionInsight HD:表示连接FusionInsight HD的HDFS。
  • Apache Hadoop:表示连接开源Apache Hadoop的HDFS。

linkConfig.uri

String

连接Apache Hadoop时的Namenode URI地址,格式为“ip:port”

linkConfig.host

String

连接MRS或FusionInsight HD时,需要配置Manager平台的IP地址。

linkConfig.port

String

连接FusionInsight HD时,需要配置Manager平台的端口。

linkConfig.casPort

String

连接FusionInsight HD时,需要配置与FusionInsight HD对接的CAS Server的端口。

linkConfig.user

String

登录Manager平台的用户名,使用集群配置时不用配置

linkConfig.password

String

登录Manager平台的密码,使用集群配置时不用配置

linkConfig.authType

枚举

认证类型,分为以下两种:
  • Simple:非安全模式选择Simple鉴权。
  • Kerberos:安全模式选择Kerberos鉴权。

linkConfig.principal

String

Kerveros认证所需的Principal,您也可以联系管理员获取此账号。使用集群配置前需在集群配置管理中配置此参数。

linkConfig.keytab

FileContent

Kerveros认证所需的keytab文件的本地绝对路径,您也可以联系管理员获取此文件。使用集群配置前需在集群配置管理中配置此参数。

linkConfig.runMode

枚举

选择HDFS连接的运行模式:
  • EMBEDDED:连接实例与CDM运行在一起,该模式性能较好。
  • STANDALONE:连接实例运行在独立进程。如果CDM需要对接多个Hadoop数据源(MRS、Hadoop或CloudTable),并且既有KERBEROS认证模式又有SIMPLE认证模式,只能使用STANDALONE模式。

    选择STANDALONE模式时,CDM支持在多个MRS集群的HDFS之间迁移数据。

  • Agent:连接实例运行在Agent上。

    若不使用AGENT运行模式,且在一个CDM中同时连接两个及以上开启Kerberos认证且realm相同的集群,只能使用EMBEDDED运行模式连接其中一个集群,其余需使用STANDALONE。

linkConfig.properties

Map

属性配置,可以添加客户端的配置属性,所添加的每个属性需配置属性名称和值

分享:

    相关文档

    相关产品