Skip to content

Commit 46cf5d2

Browse files
authored
Fix one example in tunning guide (#1145)
1 parent c28ccaf commit 46cf5d2

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

docs/source/user-guide/tuning-guide.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ For example, if there is a table "customer" that consists of 200 Parquet files,
3232
200 partitions and the table scan and certain subsequent operations will also have 200 partitions. Conversely, if the
3333
table only has a single Parquet file then there will be a single partition and the work will not be able to scale even
3434
if the cluster has resource available. Ballista supports repartitioning within a query to improve parallelism.
35-
The configuration setting `ballista.shuffle.partitions`can be set to the desired number of partitions. This is
35+
The configuration setting `datafusion.execution.target_partitions`can be set to the desired number of partitions. This is
3636
currently a global setting for the entire context. The default value for this setting is 16.
3737

3838
Note that Ballista will never decrease the number of partitions based on this setting and will only repartition if
@@ -41,11 +41,17 @@ the source operation has fewer partitions than this setting.
4141
Example: Setting the desired number of shuffle partitions when creating a context.
4242

4343
```rust
44-
let config = BallistaConfig::builder()
45-
.set("ballista.shuffle.partitions", "200")
46-
.build()?;
44+
use ballista::extension::{SessionConfigExt, SessionContextExt};
4745

48-
let ctx = BallistaContext::remote("localhost", 50050, &config).await?;
46+
let session_config = SessionConfig::new_with_ballista()
47+
.with_target_partitions(200);
48+
49+
let state = SessionStateBuilder::new()
50+
.with_default_features()
51+
.with_config(session_config)
52+
.build();
53+
54+
let ctx: SessionContext = SessionContext::remote_with_state(&url,state).await?;
4955
```
5056

5157
## Configuring Executor Concurrency Levels
@@ -75,6 +81,8 @@ processes. The default is `pull-based`.
7581
The scheduler provides a REST API for monitoring jobs. See the
7682
[scheduler documentation](scheduler.md) for more information.
7783

84+
> This is optional scheduler feature which should be enabled with rest-api feature
85+
7886
To download a query plan in dot format from the scheduler, submit a request to the following API endpoint
7987

8088
```

0 commit comments

Comments
 (0)