Skip to content

Make parallel scan thread count configurable#1140

Open
wjsl wants to merge 1 commit into
apache:mainfrom
wjsl:configurable_parallel_scan_threads
Open

Make parallel scan thread count configurable#1140
wjsl wants to merge 1 commit into
apache:mainfrom
wjsl:configurable_parallel_scan_threads

Conversation

@wjsl

@wjsl wjsl commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Replace the hardcoded single-thread BatchScanner in ParallelSnapshotScanner with a configurable value via the new fluo.scan.num.threads property. Add setNumParallelScanThreads and getNumParallelScanThreads to FluoConfiguration (default 1 thread) with accompanying Javadocs.

Replace the hardcoded single-thread BatchScanner in
ParallelSnapshotScanner with a configurable value via the new
fluo.scan.num.threads property. Add setNumParallelScanThreads and
getNumParallelScanThreads to FluoConfiguration (default 1 thread) with
accompanying Javadocs.

# Conflicts:
#	modules/core/src/main/java/org/apache/fluo/core/impl/ParallelSnapshotScanner.java
@ctubbsii ctubbsii added this to the 2.1.0 milestone Jul 10, 2026

@ctubbsii ctubbsii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'num parallel' is probably redundant, as it's implied with 'threads', so the method and property names could be shorter/more concise. I'm also not sure if this setting is only for workers. If that's the case, it could be called 'worker scan threads' and use the worker config prefix. If it's for more than just the worker, then just 'scan threads' is probably fine.

// one thread is probably good.. going for throughput
scanner = env.getAccumuloClient().createBatchScanner(env.getTable(), this.authorizations, 1);
scanner =
env.getAccumuloClient().createBatchScanner(env.getTable(), env.getAuthorizations(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changed from this.authorizations to env.getAuthorizations(). There's a few different constructors where authorizations are passed outside of the env. This might affect a test case or something... I'd have to dig. But, probably best to keep it using this.authorizations for now.

* {@value #PARALLEL_SCAN_THREADS_PROP}
*
* @param numThreads The number of threads to use, must be positive
* @since 2.0.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @since 2.0.0
* @since 2.1.0

* {@value #NUM_PARALLEL_SCAN_THREADS_DEFAULT}
*
* @return The number of threads used for parallel scans.
* @since 2.0.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @since 2.0.0
* @since 2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants