Spark基础编程API查看分区(defaultParallelism/partitions.size)

本文介绍了如何在Spark中获取默认的RDD分区数量。通过使用SparkContext, 可以轻松地查询到系统的默认并行度及特定RDD的分区大小。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

SparkContext中有默认的RDD的分区,当系统运行过程中,可以通过下列方式获得

scala> sc.defaultParallelism
res10: Int = 8


scala> otherRDD.partitions.size
res11: Int = 8



/home/ubuntu/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: w25q64_emulator.elf section `.dram0.bss' will not fit in region `dram0_0_seg' /home/ubuntu/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: DRAM segment data does not fit. /home/ubuntu/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: DRAM segment data does not fit. /home/ubuntu/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld: region `dram0_0_seg' overflowed by 8104520 bytes collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/w25q64_emulator.elf.dir/build.make:327: w25q64_emulator.elf] Error 1 make[1]: *** [CMakeFiles/Makefile2:2023: CMakeFiles/w25q64_emulator.elf.dir/all] Error 2 make: *** [Makefile:130: all] Error 2 HINT: The binary size has exceeded the limit. To resolve the issue consider reducing the binary size. You can explore size optimization techniques in the documentation by running 'idf.py docs -sp api-guides/performance/size.html#reducing-overall-size'. Note that the linker performed the dead code elimination. make failed with exit code 2, output of the command is in the /home/ubuntu/esp32/w25q64_emulator/build/log/idf_py_stderr_output_20303 and /home/ubuntu/esp32/w25q64_emulator/build/log/idf_py_stdout_output_20303
03-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值