Skip to content

Adds property for Thrift Selector threads - #6529

Merged
ddanielr merged 5 commits into
apache:2.1from
ddanielr:feature/TThreaded-Selector-core-configurable
Sep 10, 2026
Merged

Adds property for Thrift Selector threads#6529
ddanielr merged 5 commits into
apache:2.1from
ddanielr:feature/TThreaded-Selector-core-configurable

Conversation

@ddanielr

@ddanielr ddanielr commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Adds a property to configure the number of selector threads for the TThreadedSelector thrift server type.

2 is used as the default value since that was the lower bound in the old calculation.

I did not use the general.rpc.server.opts prefix pattern since the ThriftServerTypes are a set list and not pluggable.

public enum ThriftServerType {
CUSTOM_HS_HA("custom_hs_ha"),
THREADPOOL("threadpool"),
SSL("ssl"),
SASL("sasl"),
THREADED_SELECTOR("threaded_selector");

Tested and confirmed that the logging message changes on startup

getNumThreads was only being used by the BulkImport code and
have a hardcoded default value.

Refactored the method to pass in a default value to allow for more use
in the code.

Added test cases.
Allows the selector thread counts to be set via property value.

This property was added under the `general.rpc` prefix as it can be
different across instances in the same accumulo cluster.
@ddanielr ddanielr added this to the 2.1.7 milestone Sep 9, 2026
@ddanielr
ddanielr requested a review from dlmarion September 9, 2026 06:03
Comment thread core/src/main/java/org/apache/accumulo/core/conf/ConfigurationTypeHelper.java Outdated
Comment thread core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/BulkImport.java Outdated
Comment thread core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/BulkImport.java Outdated
Comment thread core/src/main/java/org/apache/accumulo/core/conf/Property.java Outdated
ddanielr and others added 3 commits September 9, 2026 09:33
Co-authored-by: Dave Marion <dlmarion@apache.org>
Remove the needless default value passing and rely on the behavior of
configuration.get().

Keep the value checks so an invalid config results in process failure.

@dlmarion dlmarion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this looks good.

@ddanielr
ddanielr merged commit db73ec6 into apache:2.1 Sep 10, 2026
9 checks passed
@ddanielr
ddanielr deleted the feature/TThreaded-Selector-core-configurable branch September 10, 2026 19:05
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