如何实现spark thriftserver运维

如何实现spark thriftserver运维,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

spark thriftserver运维:

在root@spark_master_machine机器上

启动 thriftserver

/root/cdh/spark/spark-1.4.1-bin-hadoop2.6/sbin/start-thriftserver.sh \

  --hiveconf hive.server2.thrift.port=10000 \

  --hiveconf hive.server2.thrift.bind.host=spark_master_machine  \

  --master  spark://spark_master_machine:7077  --executor-memory 24g  --executor-cores 8  --total-executor-cores 136 --driver-memory 10g --driver-java-options -XX:MaxPermSize=2g

停止 thriftserver

/root/cdh/spark/spark-1.4.1-bin-hadoop2.6/sbin/stop-thriftserver.sh 

note:

1.为了spark thrift server指定比较多的core:配置了spark-defaults.conf里spark.driver.cores

通过./sbin/start-thriftserver.sh -–help 可以用来查看可以使用哪些参数,没有发现driver-cores的指定方式,为了指定thrift server可以使用多少个core,在spark-defaults.conf中指定(不要在这台机器提交spark 任务,去脚本机器提交任务)

#

spark-defaults.conf配置如下:

spark.master                    spark://spark_master_machine:7077 

spark.eventLog.enabled           true

spark.eventLog.dir               hdfs:/namenodewithoutport/user/root/kk

spark.driver.cores               10

#

2.指定total-executor-cores来限制ExecutorID产生的数量。

如果--executor-cores 6 --total-executor-cores 102 --executor-memory 16g,

每个worker如果还闲置6core,以及16内存, 那么Executor产生两个,导致使用掉worker机器所分配的最大内存(这里分配了32g),也就会产生34个Executor

3.(防止beeline报错,MaxPermSize不够,增加配置--driver-java-options -XX:MaxPermSize=2g,配置了这个,也只是thriff server这个spark driver program MaxPermSize变化了,这个app的executor还是-XX:MaxPermSize=128m)

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注蜗牛博客行业资讯频道,感谢您对蜗牛博客的支持。

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:niceseo99@gmail.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

评论

有免费节点资源,我们会通知你!加入纸飞机订阅群

×
天气预报查看日历分享网页手机扫码留言评论电报频道链接