From the answer here,

spark.sql.shuffle.partitions configures the number of partitions that are used when shuffling data for joins or aggregations.

spark.default.parallelism is the default number of partitions in RDDs returned by transformations like join, reduceByKey, and parallelize when not set explicitly by the user. Note that spark.default.parallelism seems to only be working for raw RDD and is ignored when working with dataframes.

If the task you are performing is not a join or aggregation and you are working with dataframes then setting these will not have any effect. You could, however, set the number of partitions yourself by calling df.repartition(numOfPartitions) (don't forget to assign it to a new val) in your code.

[Spark]What's the difference between spark.sql.shuffle.partitions and spark.default.parallelism?的更多相关文章

  1. spark.sql.shuffle.partitions和spark.default.parallelism的区别

    在关于spark任务并行度的设置中,有两个参数我们会经常遇到,spark.sql.shuffle.partitions 和 spark.default.parallelism, 那么这两个参数到底有什 ...

  2. spark提交命令 spark-submit 的参数 executor-memory、executor-cores、num-executors、spark.default.parallelism分析

    转载:https://blog.csdn.net/zimiao552147572/article/details/96482120 nohup spark-submit --master yarn - ...

  3. Spark性能优化--数据倾斜调优与shuffle调优

    一.数据倾斜发生的原理 原理:在进行shuffle的时候,必须将各个节点上相同的key拉取到某个节点上的一个task来进行处理,比如按照key进行聚合或join等操作.此时如果某个key对应的数据量特 ...

  4. spark通过合理设置spark.default.parallelism参数提高执行效率

    spark中有partition的概念(和slice是同一个概念,在spark1.2中官网已经做出了说明),一般每个partition对应一个task.在我的测试过程中,如果没有设置spark.def ...

  5. Spark SQL与Hive on Spark的比较

    简要介绍了SparkSQL与Hive on Spark的区别与联系 一.关于Spark 简介 在Hadoop的整个生态系统中,Spark和MapReduce在同一个层级,即主要解决分布式计算框架的问题 ...

  6. spark SQL学习(认识spark SQL)

    spark SQL初步认识 spark SQL是spark的一个模块,主要用于进行结构化数据的处理.它提供的最核心的编程抽象就是DataFrame. DataFrame:它可以根据很多源进行构建,包括 ...

  7. Spark Shell启动时遇到<console>:14: error: not found: value spark import spark.implicits._ <console>:14: error: not found: value spark import spark.sql错误的解决办法(图文详解)

    不多说,直接上干货! 最近,开始,进一步学习spark的最新版本.由原来经常使用的spark-1.6.1,现在来使用spark-2.2.0-bin-hadoop2.6.tgz. 前期博客 Spark ...

  8. Spark SQL概念学习系列之Spark SQL概述

    很多人一个误区,Spark SQL重点不是在SQL啊,而是在结构化数据处理! Spark SQL结构化数据处理 概要: 01 Spark SQL概述 02 Spark SQL基本原理 03 Spark ...

  9. Kafka:ZK+Kafka+Spark Streaming集群环境搭建(二十二)Spark Streaming接收流数据及使用窗口函数

    官网文档:<http://spark.apache.org/docs/latest/streaming-programming-guide.html#a-quick-example> Sp ...

随机推荐

  1. cd-hit软件

    参考网址:https://www.jianshu.com/p/57af07b9e986 1.安装 wget https://github.com/weizhongli/cdhit/releases/d ...

  2. 从 mvc 到 REST

    1. 理解MVC MVC是一种经典的设计模式,全名为Model-View-Controller,即模型-视图-控制器. 其中,模型是用于封装数据的载体,例如,在Java中一般通过一个简单的POJO(P ...

  3. 使用git或TortoiseGit推送项目至gitlab

    一.Wins安装Git+Trtoisegit工具实现版本克隆与推送 Git:         https://git-scm.com/ Tortoisegit: https://tortoisegit ...

  4. django1.10使用本地静态文件

    django1.10使用本地静态文件方法 本文介绍的静态文件使用,是指启动web站点后,访问静态资源的用法,实际静态资源地址就是一个个的url 如果没有启动web站点,只是本地调试html页面,那直接 ...

  5. SSM的例子-参考

    ssm的例子:http://blog.csdn.net/double030/article/details/63683613

  6. new usercontrol

    http://www.codeproject.com/Articles/12421/The-Grouper-A-Custom-Groupbox-Control

  7. centos openvpn 安装

    安装环境: 系统:centos 6.5 openvpn:openvpn-2.2.1 lzo:lzo-2.09    下载地址:http://www.oberhumer.com/opensource/l ...

  8. 与服务器同步工程(expect脚本)

    先看下我实际用的例子: #!/usr/bin/expect spawn rsync -vazu ssh-src/src wayne@192.168.5.2:~/projects/ expect &qu ...

  9. MYSQL启用日志,和查看日志

    mysql有以下几种日志:     错误日志:     -log-err     查询日志:     -log     慢查询日志:   -log-slow-queries     更新日志:     ...

  10. JavaScript各种继承方式(四):原型式继承(prototypal inheritance)

    一 原理 利用工具函数,通过原型对象直接得到父类的实例,并当作子类对实例使用. function inherit(obj){ // 在闭包中创建子类,对外隐藏子类 function Temp(){ } ...