首页 > 其他分享 >chunjun同步两个带Kerberos认证的CDH集群数据

chunjun同步两个带Kerberos认证的CDH集群数据

时间:2023-01-30 10:47:52浏览次数:52  
标签:hdfs kerberos Kerberos CDH dfs chunjun namenode nameservice1 properties

        最近在项目中遇到同步两个 CDH 数据文件的需求,调研了一圈,发现 datax 不支持两个 cdh 同时进行 kerberos 认证,因此切换到 chunjun,chunjun 在 kerberos 认证的配置这块,官网也没有详细的介绍案例,在查看源代码后,确定了配置项及各配置项的值,供大家参考

  1 {
  2   "job": {
  3     "content": [
  4       {
  5         "reader" : {
  6           "parameter" : {
  7             "path" : "hdfs://cdh-test-namenode05:8020/user/hive/warehouse/testuser_db.db/testuser_user/t4.txt",
  8             "hadoopConfig" : {
  9               "properties.hadoop.user.name": "testuser",
 10               "properties.dfs.ha.namenodes.nameservice1": "namenode27,namenode29",
 11               "properties.fs.defaultFS": "hdfs://nameservice1",
 12               "properties.dfs.namenode.rpc-address.nameservice1.namenode27": "cdh-test-namenode04:8020",
 13               "properties.dfs.client.failover.proxy.provider.nameservice1": "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider",
 14               "properties.dfs.namenode.rpc-address.nameservice1.namenode29": "cdh-test-namenode05:8020",
 15               "properties.dfs.nameservices": "nameservice1",
 16               "properties.fs.hdfs.impl.disable.cache": "true",
 17               "properties.dfs.client.use.datanode.hostname":"true",
 18               "dfs.client.use.datanode.hostname":"true",
 19               "properties.fs.hdfs.impl": "org.apache.hadoop.hdfs.DistributedFileSystem",
 20               "hadoop.security.authentication": "Kerberos",
 21               "dfs.namenode.kerberos.principal": "hdfs/[email protected]",
 22               "dfs.datanode.kerberos.principal": "hdfs/[email protected]",
 23               "yarn.resourcemanager.principal": "rm/[email protected]",
 24               "dfs.namenode.kerberos.internal.spnego.principal": "HTTP/[email protected]",
 25               "hadoop.security.authorization": "true",
 26               "dfs.namenode.keytab.file": "/app/data/CDH6.3.2/kerberos/testuser.keytab",
 27               "java.security.krb5.conf": "/app/data/CDH6.3.2/krb5/krb5.conf",
 28               "useLocalFile": "true",
 29               "principalFile": "/app/data/CDH6.3.2/kerberos/testuser.keytab",
 30               "principal": "testuser/cdh-test-namenode05"
 31             },
 32 
 33             "column": [
 34               {
 35                 "name": "id",
 36                 "type": "int"
 37               },
 38               {
 39                 "name": "name",
 40                 "type": "string"
 41               }
 42             ],
 43             "fieldDelimiter" : ",",
 44             "encoding" : "utf-8",
 45             "defaultFS": "hdfs://cdh-test-namenode05:8020",
 46             "fileType" : "text"
 47           },
 48           "name" : "hdfsreader"
 49         },
 50         "writer": {
 51           "name": "hdfswriter",
 52           "parameter": {
 53             "path": "/user/hive/warehouse/test_system_user.db/testuser",
 54             "defaultFS": "hdfs://test01:8020",
 55             "column": [
 56               {
 57                 "name": "id",
 58                 "type": "int"
 59               },
 60               {
 61                 "name": "name",
 62                 "type": "string"
 63               }
 64             ],
 65             "fileType": "text",
 66             "fieldDelimiter": ",",
 67             "compress":"gzip",
 68             "encoding": "utf-8",
 69             "fileName": "20220705",
 70             "writeMode": "overwrite",
 71             "hadoopConfig": {
 72               "properties.hadoop.user.name": "test_system_user",
 73               "properties.dfs.ha.namenodes.nameservice1": "namenode37,namenode51",
 74               "properties.fs.defaultFS": "hdfs://nameservice1",
 75               "properties.dfs.namenode.rpc-address.nameservice1.namenode51": "test02:8020",
 76               "properties.dfs.client.failover.proxy.provider.nameservice1": "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider",
 77               "properties.dfs.namenode.rpc-address.nameservice1.namenode37": "test01:8020",
 78               "properties.dfs.nameservices": "nameservice1",
 79               "properties.dfs.client.use.datanode.hostname":"true",
 80               "dfs.client.use.datanode.hostname":"true",
 81               "properties.fs.hdfs.impl.disable.cache": "true",
 82               "properties.fs.hdfs.impl": "org.apache.hadoop.hdfs.DistributedFileSystem",
 83               "hadoop.security.authentication": "Kerberos",
 84               "dfs.namenode.kerberos.principal": "hdfs/[email protected]",
 85               "dfs.datanode.kerberos.principal": "hdfs/[email protected]",
 86               "yarn.resourcemanager.principal": "rm/[email protected]",
 87               "dfs.namenode.kerberos.internal.spnego.principal": "HTTP/[email protected]",
 88               "hadoop.security.authorization": "true",
 89               "dfs.namenode.keytab.file": "/app/data/cloudera/CDH-6.3.2/kerberos/test_system_user.keytab",
 90               "java.security.krb5.conf": "/app/data/cloudera/CDH-6.3.2/krb5/krb5.conf",
 91               "useLocalFile": "true",
 92               "principalFile": "/app/data/cloudera/CDH-6.3.2/kerberos/test_system_user.keytab",
 93               "principal": "test_system_user/[email protected]"
 94             }
 95           }
 96         }
 97       }
 98     ],
 99     "setting": {
100       "speed": {
101         "channel": 4,
102         "bytes": 0
103       }
104     }
105   }
106 }

 

标签:hdfs,kerberos,Kerberos,CDH,dfs,chunjun,namenode,nameservice1,properties
From: https://www.cnblogs.com/wxm2270/p/17074744.html

相关文章

  • 星环科技TDH多模型统一架构VS CDH架构
    CDH是Cloudera的开源平台发行版,通过将Hadoop与其他十几个开源项目集成,为企业大数据业务提供服务。在CDH开源大数据方案中,是通过多个互相独立的组件提供相应的能力,每个场景需......
  • 2023牛客寒假算法基础集训营1 个人题解(ACDHKL)
    A.WorldFinal?WorldCup!(I)题意:给10场比赛的点球输赢情况,奇数为A队点球,偶数为B队点球思路:用两个变量x,y来分别存A队当前赢的场次和B队当前赢的场次然后就就扫......
  • 部署CDH显示对于此 Cloudera Manager 版本 (6.2.1) 太新的 CDH 版本不会显示
    解决办法:CDH-6.2.1-1.cdh6.2.1.p0.1425774-el7.parcel.sha1此文件没有变更到CDH-6.2.1-1.cdh6.2.1.p0.1425774-el7.parcel.shacd/opt/cloudera/parcel-repomvCDH-6.2.1-1.......
  • Kerberos
    Kerberos是一种网络认证协议,其设计目标是通过密钥系统为客户机/服务器应用程序提供强大的认证服务。该认证过程的实现不依赖于主机操作系统的认证......
  • Java代码kafka通过Kerberos认证消费数据
    引入依赖<dependency><groupId>org.springframework.kafka</groupId><artifactId>spring-kafka</artifactId></dependency>kafka生产importjava.io.PrintStrea......
  • CDH-内存挑拨过度验证阈值的解决方法
    1、问题描述hadoop应用程序或者Yarn的作业随机的出现OutOfMemory(OOM),在ClouderaManager界面显示如下警告:ip-172-31-24-169.ap-southeast-1.compute.internal:Memory......
  • CDH安装前置准备
    温馨提示:要看高清无码套图,请使用手机打开并单击图片放大查看。1.文档编写目的每次安装CDH集群时都需要做很多前置条件准备,以确保安装成功以及运行主机检查时能顺利通过。本......
  • 从入门到精通 - Fayson带你玩转CDH
    温馨提示:如果使用电脑查看图片不清晰,可以使用手机打开文章单击文中的图片放大查看高清原图。Fayson的github:​​https://github.com/fayson/cdhproject​​提示:代码块部分可......
  • CDH配置Flume无法失效的问题
    在使用过cdh6.3.1版本的flume时,配置了从kafka消费写入hdfs,使用的是FileChannel。使用FileChannel还是考虑到数据可靠性。但是今天在配置的时候,一直不生效。由于我在配置......
  • [CDH官方文档]--CDH最新官方文档(最全)
    原文网站:​​https://www.cloudera.com/documentation/enterprise/latest.html​​​​​​​​Introduction​​​​CDH ​​​​ClouderaMan......