pyspark 以HA方式访问hdfs
sc, sqlContext = s.startContext(appName)
sc._jsc.hadoopConfiguration().set("dfs.nameservices", "umecluster2")
sc._jsc.hadoopConfiguration().set('dfs.ha.namenodes.umecluster2', 'nn1,nn2')
sc._jsc.hadoopConfiguration().set('dfs.namenode.rpc-address.umecluster2.nn2', 'hdfs://10.5.145.xxx:8020')
sc._jsc.hadoopConfiguration().set('dfs.namenode.rpc-address.umecluster2.nn1', 'hdfs://10.5.145.xxx:8020')
sc._jsc.hadoopConfiguration().set("dfs.client.failover.proxy.provider.umecluster2", "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider")
本文标题:pyspark 以HA方式访问hdfs
本文链接:https://www.haomeiwen.com/subject/rsbzfctx.html
网友评论