Skip to content

Commit

Permalink
make bookkeeper throttle Configurable (apache#7901)
Browse files Browse the repository at this point in the history
Motivation
This PR makes bookkeeper throttle value Configurable
  • Loading branch information
aloyszhang authored Sep 9, 2020
1 parent e72b0f7 commit fe621a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,12 @@ public class ServiceConfiguration implements PulsarConfiguration {
)
private boolean bookkeeperClientExposeStatsToPrometheus = false;

@FieldContext(
category = CATEGORY_STORAGE_BK,
doc = "Throttle value for bookkeeper client"
)
private int bookkeeperClientThrottleValue = 0;

/**** --- Managed Ledger --- ****/
@FieldContext(
minValue = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ClientConfiguration createBkClientConfiguration(ServiceConfiguration conf) {
bkConf.setTLSTrustStorePasswordPath(conf.getBookkeeperTLSTrustStorePasswordPath());
}

bkConf.setThrottleValue(0);
bkConf.setThrottleValue(conf.getBookkeeperClientThrottleValue());
bkConf.setAddEntryTimeout((int) conf.getBookkeeperClientTimeoutInSeconds());
bkConf.setReadEntryTimeout((int) conf.getBookkeeperClientTimeoutInSeconds());
bkConf.setSpeculativeReadTimeout(conf.getBookkeeperClientSpeculativeReadTimeoutInMillis());
Expand Down

0 comments on commit fe621a6

Please sign in to comment.