Increase concurrency in Spark artist without increasing core

I am launching Spark-Kafka Streaming with 4 artists (1 core each). And the theme of the kafka theme had 50 sections.

In the pre-sale part of the streaming java program, I connect to the oracle and do some work. Apache DBCP2 is used for connection pooling.

Spark-streaming program performs 4 database connections - there may be 1 for each artist. But My Expectation - since there are 50 partitions, 50 threads must be executed and there are 50 database connections.

How to increase parallelism without increasing the number of cores.

+4
source share
2 answers

. Spark , .

4 "" → 4 → 4 .

+3

​​ ( ). 4 , 1 , , 4 . , Kafka 50 , 13 (4 , 50/4 = 12,5), . 4 .

0

Source: https://habr.com/ru/post/1663689/


All Articles