大家好,我是考100分的小小码 ,祝大家学习进步,加薪顺利呀。今天说一说ambari部署hadoop集群_impala apache,希望您对编程的造诣更进一步.
1、环境说明
操作系统 | CentOS Linux release 7.4.1708 (Core) |
---|---|
Ambari | 2.6.x |
HDP | 2.6.3.0 |
Spark | 2.x |
Phoenix | 4.10.0-HBase-1.2 |
2、条件
-
HBase 安装完成
-
Phoenix 已经启用,Ambari界面如下所示:
-
Spark 2安装完成
3、Spark2 与 Phoenix整合
Phoenix 官网整合教程: http://phoenix.apache.org/phoenix_spark.html
步骤:
-
进入 Ambari Spark2 配置界面
-
找到
自定义 spark2-defaults
并添加如下配置项:spark.driver.extraClassPath=/usr/hdp/current/phoenix-client/phoenix-4.10.0-HBase-1.2-client.jar spark.executor.extraClassPath=/usr/hdp/current/phoenix-client/phoenix-4.10.0-HBase-1.2-client.jar
代码100分
4、Yarn HA 问题
如果配置了Yarn HA, 则需要修改 Yarn HA 配置,否则spark-submit
提交任务会报如下错误:
代码100分Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider.getProxyInternal()Ljava/lang/Object; from class org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider
at org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider.init(RequestHedgingRMFailoverProxyProvider.java:75)
at org.apache.hadoop.yarn.client.RMProxy.createRMFailoverProxyProvider(RMProxy.java:163)
at org.apache.hadoop.yarn.client.RMProxy.createRMProxy(RMProxy.java:94)
at org.apache.hadoop.yarn.client.ClientRMProxy.createRMProxy(ClientRMProxy.java:72)
at org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.serviceStart(YarnClientImpl.java:187)
at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
at org.apache.spark.deploy.yarn.Client.submitApplication(Client.scala:153)
at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend.start(YarnClientSchedulerBackend.scala:56)
at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:173)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:509)
at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2516)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$7.apply(SparkSession.scala:922)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$7.apply(SparkSession.scala:914)
at scala.Option.getOrElse(Option.scala:121)
at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:914)
at cn.spark.sxt.SparkOnPhoenix$.main(SparkOnPhoenix.scala:13)
at cn.spark.sxt.SparkOnPhoenix.main(SparkOnPhoenix.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.i
修改Yarn HA配置:
将原来的配置
:
yarn.client.failover-proxy-provider=org.apache.hadoop.yarn.client.RequestHedgingRMFailoverProxyProvider
改为现在的配置
:
代码100分yarn.client.failover-proxy-provider=org.apache.hadoop.yarn.client.ConfiguredRMFailoverProxyProvider
如果没有配置 Yarn HA, 则不需要进行此步配置
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/9902.html