做外贸用哪个网站好,佛山网站制作网站设计,设计公司排名前十强,软件开发专业有哪些课程一#xff0c;背景 carbondata的入库采用arbonData Thrift Server方式提供#xff0c;由于存在异常的入库segments但是显示状态是success#xff0c;所以每天运行另一个博客中的脚本#xff0c;出现连接超时#xff0c;运行不正常#xff0c;排查是每天连接数太多#x…一背景 carbondata的入库采用arbonData Thrift Server方式提供由于存在异常的入库segments但是显示状态是success所以每天运行另一个博客中的脚本出现连接超时运行不正常排查是每天连接数太多每天将segments都遍历一遍。二 优化策略
a,策略一 1通过添加spark的调度池 在Spark中调度池Scheduler Pool用于为不同的作业分配资源池以控制其执行优先级。设置调度池可以帮助管理不同作业之间的资源争用情况。要使用调度池您需要配置Fair Scheduler并创建相应的调度池配置文件。 1-1 设置调度池 spark.sql.hive.thriftServer.scheduler.poolmy-pool 1-2配置调度池文件 cp fairscheduler.xml.template fairscheduler.xml pool namemy-poolschedulingModeFAIR/schedulingModeweight1/weightminShare3/minSharemaxRunningApps50/maxRunningAppsmaxResources100g,50/maxResourcesminResources4g,8/minResourcesfairSharePreemptionTimeout300/fairSharePreemptionTimeoutminSharePreemptionTimeout120/minSharePreemptionTimeoutfairSharePreemptionThreshold0.5/fairSharePreemptionThreshold/pool
2启用异步模式提搞并发能力spark.sql.hive.thriftServer.async true
3,spark-default中配置xml
spark.sql.hive.thriftServer.scheduler.poolmy-pool
spark.sql.hive.thriftServer.thrift.port10000
spark.sql.hive.thriftServer.idleSessionTimeout3600
spark.sql.hive.thriftServer.asynctrue4启动命令/bin/spark-submit --master yarn --conf spark.driver.maxResultSize20g --conf spark.sql.hive.thriftServer.scheduler.poolmy-pool --conf spark.scheduler.modeFAIR \--conf spark.scheduler.allocation.file$SPARK_HOME/conf/fairscheduler.xml --conf spark.sql.shuffle.partition50 --driver-memory 25g --executor-cores 4 --executor-memory 5G --num-executors 10 --class org.apache.carbondata.spark.thriftserver.CarbonThriftServer $SPARK_HOME/carbonlib/apache-carbondata-2.X-bin-sparkx-hadoop2.x.x.jar
通过指定spark.sql.hive.thriftServer.scheduler.pool设置
5验证通过查看是否 有create pool和 Removed from pool
b,策略二可以尝试通过zk进行负载均衡这样还待测试