Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POC Dynamic threadpool #158

Draft
wants to merge 44 commits into
base: concurrent-v2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3d7184b
Bump Netty to 4.1.114.Final (#16182)
reta Oct 3, 2024
d1fd47c
Implement phone number analyzer (#15915)
rursprung Oct 3, 2024
f9e0c85
Fix japicmp configuration by treating abstract-to-default method chan…
reta Oct 4, 2024
aef7eca
Add more unit tests for RemoteStoreUtils and RemoteFsTimestampAwareTr…
sachinpkale Oct 4, 2024
ba8f1be
Run queued operations post v2 operations completion (#16179)
gbbafna Oct 4, 2024
b06ddb6
Fix warnings from SLF4J on startup when repository-s3 is installed (#…
cwperks Oct 4, 2024
421a1cc
Fix unknown parameter source_remote_translog_repository bug (#16192)
sachinpkale Oct 4, 2024
7a58f5e
Mute snapshot v2 flaky tests (#16193)
gbbafna Oct 7, 2024
a81b868
Implementing pagination for _cat/shards (#14641)
gargharsh3134 Oct 7, 2024
146b0f7
Update Apache Lucene to 9.12.0 (#15333)
reta Oct 7, 2024
e885aa9
Latency improvements to Multi Term Aggregations (#14993)
expani Oct 7, 2024
e24b4c9
Add wlm resiliency orchestrator (query group service) (#15925)
kaushalmahi12 Oct 8, 2024
266bdd3
[Tiered Caching] Segmented cache changes (#16047)
sgup432 Oct 8, 2024
1e49aa8
[Star tree] Add date field rounding support in star tree (#15249)
bharath-techie Oct 8, 2024
3696c29
[Star tree] Refactoring builder tests (#16036)
bharath-techie Oct 8, 2024
5279d21
Change successfulSearchShardIndices to Set<Index> (#16110)
dzane17 Oct 8, 2024
e8e041b
Add more concurrent Snapshot V2 Integ Tests (#16207)
gbbafna Oct 8, 2024
aad325f
Bump com.azure:azure-json from 1.1.0 to 1.3.0 in /plugins/repository-…
dependabot[bot] Oct 8, 2024
96082f7
Close RemoteStorePinnedTimestampService on Node.close() (#16228)
sachinpkale Oct 8, 2024
febbc00
Add TLSv1.3 in jdk.tls.client.protocols systemProp in gradle.properti…
cwperks Oct 8, 2024
2ed8ff0
Attempt to delete backport branches only for OpenSearch repo (#16240)
gaiksaya Oct 8, 2024
62b1537
Fix Cache backward compatibility breaking change (#16238)
sgup432 Oct 9, 2024
b5917c5
[Star tree] Moving compositeCodec to composite912Codec and dropping c…
bharath-techie Oct 9, 2024
acf209f
Bump com.google.api-client:google-api-client from 2.2.0 to 2.7.0 in /…
dependabot[bot] Oct 9, 2024
e7757e7
Update Apache Lucene version for 2.18.0 (#16252)
reta Oct 9, 2024
9225aa2
Bump com.squareup.okio:okio from 3.9.0 to 3.9.1 in /test/fixtures/hdf…
dependabot[bot] Oct 9, 2024
ba0ccfa
Bump io.grpc:grpc-api from 1.57.2 to 1.68.0 in /plugins/discovery-gce…
dependabot[bot] Oct 9, 2024
a09750a
Remove redundant force merge - histo rest tests (#16144)
finnegancarroll Oct 9, 2024
68e3e45
The protobuf-java leaks through client library dependencies (#16254)
reta Oct 9, 2024
9e53d9b
Fix Flaky Test org.opensearch.gateway.RecoveryFromGatewayIT.testShard…
kkewwei Oct 10, 2024
d7b0116
Revert remote publication method renaming in DiscoveryNode (#16250)
soosinha Oct 10, 2024
58adc18
BugFix: call listener.onFailure on failure to pin the timestamp (#16248)
sachinpkale Oct 10, 2024
b2253f1
[Workload Management] QueryGroup Stats API Logic (#15777)
ruai0511 Oct 10, 2024
b3b8c9b
Add Integration Tests for Workload Management CRUD APIs (#15955)
ruai0511 Oct 10, 2024
691f725
Reconfigure remote state thread pool count (#16245)
soosinha Oct 10, 2024
942765e
Add snapshot_path prefix to snapshot shards path file on S3 (#16267)
ashking94 Oct 10, 2024
1e7f6df
Support JDK-23 (build time and runtime) (#16257)
reta Oct 10, 2024
34b794b
Making wlm stats output easier to understand (#16278)
kaushalmahi12 Oct 11, 2024
d6ea8eb
Change remote store restore cluster state priority to URGENT (#16281)
sachinpkale Oct 11, 2024
94bcbe3
Add support to dynamically resize threadpools size
gbbafna Oct 8, 2024
8cd1d68
Add more validations and Integ Tests
gbbafna Oct 9, 2024
a3db411
Address PR comments
gbbafna Oct 11, 2024
cc11f7e
Removing cluster setting as part of ThreadPool and just registering a…
gbbafna Oct 11, 2024
2df2683
Address PR Comments
gbbafna Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/delete_backport_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
if: startsWith(github.event.pull_request.head.ref,'backport/')
if: github.repository == 'opensearch-project/OpenSearch' && startsWith(github.event.pull_request.head.ref,'backport/')
steps:
- name: Delete merged branch
uses: actions/github-script@v7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ 11, 17, 21 ]
java: [ 11, 17, 21, 23 ]
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
steps:
- uses: actions/checkout@v4
Expand Down
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Added
- Add support for async deletion in S3BlobContainer ([#15621](https://github.com/opensearch-project/OpenSearch/pull/15621))
- MultiTermQueries in keyword fields now default to `indexed` approach and gated behind cluster setting ([#15637](https://github.com/opensearch-project/OpenSearch/pull/15637))
- [Workload Management] Add Integration Tests for Workload Management CRUD APIs ([#15955](https://github.com/opensearch-project/OpenSearch/pull/15955))
- [Workload Management] QueryGroup resource cancellation framework changes ([#15651](https://github.com/opensearch-project/OpenSearch/pull/15651))
- [Workload Management] Add orchestrator for wlm resiliency (QueryGroupService) ([#15925](https://github.com/opensearch-project/OpenSearch/pull/15925))
- [Workload Management] Add QueryGroup Stats API Logic ([15777](https://github.com/opensearch-project/OpenSearch/pull/15777))
- Fallback to Remote cluster-state on Term-Version check mismatch - ([#15424](https://github.com/opensearch-project/OpenSearch/pull/15424))
- Implement WithFieldName interface in ValuesSourceAggregationBuilder & FieldSortBuilder ([#15916](https://github.com/opensearch-project/OpenSearch/pull/15916))
- Add successfulSearchShardIndices in searchRequestContext ([#15967](https://github.com/opensearch-project/OpenSearch/pull/15967))
- Add successfulSearchShardIndices in searchRequestContext ([#15967](https://github.com/opensearch-project/OpenSearch/pull/15967), [#16110](https://github.com/opensearch-project/OpenSearch/pull/16110))
- [Tiered Caching] Segmented cache changes ([#16047](https://github.com/opensearch-project/OpenSearch/pull/16047))
- Add support for msearch API to pass search pipeline name - ([#15923](https://github.com/opensearch-project/OpenSearch/pull/15923))
- Add _list/indices API as paginated alternate to _cat/indices ([#14718](https://github.com/opensearch-project/OpenSearch/pull/14718))
- Add success and failure metrics for async shard fetch ([#15976](https://github.com/opensearch-project/OpenSearch/pull/15976))
- Add new metric REMOTE_STORE to NodeStats API response ([#15611](https://github.com/opensearch-project/OpenSearch/pull/15611))
- Add support to dynamically resize threadpools size. ([#16236](https://github.com/opensearch-project/OpenSearch/pull/16236))
- [S3 Repository] Change default retry mechanism of s3 clients to Standard Mode ([#15978](https://github.com/opensearch-project/OpenSearch/pull/15978))
- Add changes to block calls in cat shards, indices and segments based on dynamic limit settings ([#15986](https://github.com/opensearch-project/OpenSearch/pull/15986))
- New `phone` & `phone-search` analyzer + tokenizer ([#15915](https://github.com/opensearch-project/OpenSearch/pull/15915))
- Add _list/shards API as paginated alternate to _cat/shards ([#14641](https://github.com/opensearch-project/OpenSearch/pull/14641))
- Latency and Memory allocation improvements to Multi Term Aggregation queries ([#14993](https://github.com/opensearch-project/OpenSearch/pull/14993))

### Dependencies
- Bump `com.azure:azure-identity` from 1.13.0 to 1.13.2 ([#15578](https://github.com/opensearch-project/OpenSearch/pull/15578))
Expand All @@ -33,8 +41,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Bump `dnsjava:dnsjava` from 3.6.1 to 3.6.2 ([#16041](https://github.com/opensearch-project/OpenSearch/pull/16041))
- Bump `com.maxmind.geoip2:geoip2` from 4.2.0 to 4.2.1 ([#16042](https://github.com/opensearch-project/OpenSearch/pull/16042))
- Bump `com.maxmind.db:maxmind-db` from 3.1.0 to 3.1.1 ([#16137](https://github.com/opensearch-project/OpenSearch/pull/16137))
- Bump Apache lucene from 9.11.1 to 9.12.0 ([#15333](https://github.com/opensearch-project/OpenSearch/pull/15333))
- Bump `com.azure:azure-core-http-netty` from 1.15.3 to 1.15.4 ([#16133](https://github.com/opensearch-project/OpenSearch/pull/16133))
- Bump `org.jline:jline` from 3.26.3 to 3.27.0 ([#16135](https://github.com/opensearch-project/OpenSearch/pull/16135))
- Bump `netty` from 4.1.112.Final to 4.1.114.Final ([#16182](https://github.com/opensearch-project/OpenSearch/pull/16182))
- Bump `com.google.api-client:google-api-client` from 2.2.0 to 2.7.0 ([#16216](https://github.com/opensearch-project/OpenSearch/pull/16216))
- Bump `com.azure:azure-json` from 1.1.0 to 1.3.0 ([#16217](https://github.com/opensearch-project/OpenSearch/pull/16217))
- Bump `io.grpc:grpc-api` from 1.57.2 to 1.68.0 ([#16213](https://github.com/opensearch-project/OpenSearch/pull/16213))
- Bump `com.squareup.okio:okio` from 3.9.0 to 3.9.1 ([#16212](https://github.com/opensearch-project/OpenSearch/pull/16212))

### Changed
- Add support for docker compose v2 in TestFixturesPlugin ([#16049](https://github.com/opensearch-project/OpenSearch/pull/16049))
Expand All @@ -56,6 +70,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fix infinite loop in nested agg ([#15931](https://github.com/opensearch-project/OpenSearch/pull/15931))
- Fix race condition in node-join and node-left ([#15521](https://github.com/opensearch-project/OpenSearch/pull/15521))
- Streaming bulk request hangs ([#16158](https://github.com/opensearch-project/OpenSearch/pull/16158))
- Fix warnings from SLF4J on startup when repository-s3 is installed ([#16194](https://github.com/opensearch-project/OpenSearch/pull/16194))
- Fix protobuf-java leak through client library dependencies ([#16254](https://github.com/opensearch-project/OpenSearch/pull/16254))

### Security

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ dependencies {
api 'com.github.johnrengelman:shadow:8.1.1'
api 'org.jdom:jdom2:2.0.6.1'
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${props.getProperty('kotlin')}"
api 'de.thetaphi:forbiddenapis:3.6'
api 'de.thetaphi:forbiddenapis:3.8'
api 'com.avast.gradle:gradle-docker-compose-plugin:0.17.6'
api "org.yaml:snakeyaml:${props.getProperty('snakeyaml')}"
api 'org.apache.maven:maven-model:3.9.6'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class ThirdPartyAuditPrecommitPlugin extends PrecommitPlugin {
public TaskProvider<? extends Task> createTask(Project project) {
project.getPlugins().apply(CompileOnlyResolvePlugin.class);
project.getConfigurations().create("forbiddenApisCliJar");
project.getDependencies().add("forbiddenApisCliJar", "de.thetaphi:forbiddenapis:3.5.1");
project.getDependencies().add("forbiddenApisCliJar", "de.thetaphi:forbiddenapis:3.8");

Configuration jdkJarHellConfig = project.getConfigurations().create(JDK_JAR_HELL_CONFIG_NAME);
if (BuildParams.isInternal() && project.getPath().equals(":libs:opensearch-core") == false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@
import java.util.stream.Stream;

public class DistroTestPlugin implements Plugin<Project> {
private static final String SYSTEM_JDK_VERSION = "21.0.4+7";
private static final String SYSTEM_JDK_VERSION = "23+37";
private static final String SYSTEM_JDK_VENDOR = "adoptium";
private static final String GRADLE_JDK_VERSION = "21.0.4+7";
private static final String GRADLE_JDK_VERSION = "23+37";
private static final String GRADLE_JDK_VENDOR = "adoptium";

// all distributions used by distro tests. this is temporary until tests are per distribution
Expand Down
11 changes: 6 additions & 5 deletions buildSrc/version.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
opensearch = 3.0.0
lucene = 9.12.0-snapshot-847316d
lucene = 9.12.0

bundled_jdk_vendor = adoptium
bundled_jdk = 21.0.4+7
bundled_jdk = 23+37

# optional dependencies
spatial4j = 0.7
Expand All @@ -25,11 +25,12 @@ jakarta_annotation = 1.3.5
google_http_client = 1.44.1
tdigest = 3.3
hdrhistogram = 2.2.2
grpc = 1.68.0

# when updating the JNA version, also update the version in buildSrc/build.gradle
jna = 5.13.0

netty = 4.1.112.Final
netty = 4.1.114.Final
joda = 2.12.7

# project reactor
Expand Down Expand Up @@ -59,9 +60,9 @@ bouncycastle=1.78
randomizedrunner = 2.7.1
junit = 4.13.2
hamcrest = 2.1
mockito = 5.12.0
mockito = 5.14.1
objenesis = 3.2
bytebuddy = 1.14.9
bytebuddy = 1.15.4

# benchmark dependencies
jmh = 1.35
Expand Down
4 changes: 3 additions & 1 deletion client/rest-high-level/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ restResources {
}

dependencies {
api project(':server')
api(project(':server')) {
exclude group: 'com.google.protobuf'
}
api project(':client:rest')
api project(':modules:mapper-extras')
api project(':modules:parent-join')
Expand Down
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ systemProp.org.gradle.dependency.duplicate.project.detection=false
# Enforce the build to fail on deprecated gradle api usage
systemProp.org.gradle.warning.mode=fail

# forcing to use TLS1.2 to avoid failure in vault
# see https://github.com/hashicorp/vault/issues/8750#issuecomment-631236121
systemProp.jdk.tls.client.protocols=TLSv1.2
systemProp.jdk.tls.client.protocols=TLSv1.2,TLSv1.3

# jvm args for faster test execution by default
systemProp.tests.jvm.argline=-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m
2 changes: 1 addition & 1 deletion gradle/code-coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repositories {

allprojects {
plugins.withId('jacoco') {
jacoco.toolVersion = '0.8.10'
jacoco.toolVersion = '0.8.12'
}
}

Expand Down
1 change: 1 addition & 0 deletions gradle/missing-javadoc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ configure([
project(":plugins:analysis-icu"),
project(":plugins:analysis-kuromoji"),
project(":plugins:analysis-nori"),
project(":plugins:analysis-phonenumber"),
project(":plugins:analysis-phonetic"),
project(":plugins:analysis-smartcn"),
project(":plugins:analysis-stempel"),
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions libs/core/licenses/lucene-core-9.12.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fdb055d569bb20bfce9618fe2b01c29bab7f290c
2 changes: 1 addition & 1 deletion libs/core/src/main/java/org/opensearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public class Version implements Comparable<Version>, ToXContentFragment {
public static final Version V_2_17_0 = new Version(2170099, org.apache.lucene.util.Version.LUCENE_9_11_1);
public static final Version V_2_17_1 = new Version(2170199, org.apache.lucene.util.Version.LUCENE_9_11_1);
public static final Version V_2_17_2 = new Version(2170299, org.apache.lucene.util.Version.LUCENE_9_11_1);
public static final Version V_2_18_0 = new Version(2180099, org.apache.lucene.util.Version.LUCENE_9_11_1);
public static final Version V_2_18_0 = new Version(2180099, org.apache.lucene.util.Version.LUCENE_9_12_0);
public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_12_0);
public static final Version CURRENT = V_3_0_0;

Expand Down
13 changes: 13 additions & 0 deletions libs/core/src/main/java/org/opensearch/core/common/Strings.java
Original file line number Diff line number Diff line change
Expand Up @@ -815,4 +815,17 @@ public static String toLowercaseAscii(String in) {
}
return out.toString();
}

/**
* Check whether every single character in the string is a digit.
*
* <p>An empty string returns {@code false}.</p>
*
* @param s the string, must not be null.
* @return {@code true} if the string only contains digits, {@code false} otherwise.
*/
public static boolean isDigits(final String s) {
return !s.isEmpty() && s.chars().allMatch(Character::isDigit);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,15 @@ public void testToStringToXContentWithOrWithoutParams() {
containsString("\"color_from_param\":\"blue\"")
);
}

public void testIsDigits() {
assertTrue(Strings.isDigits("1"));
assertTrue(Strings.isDigits("123"));
assertFalse(Strings.isDigits(""));
assertFalse(Strings.isDigits("abc"));
assertFalse(Strings.isDigits("123a"));
assertFalse(Strings.isDigits("0x123"));
assertFalse(Strings.isDigits("123.4"));
assertFalse(Strings.isDigits("123f"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ public GrokCaptureExtracter forBoolean(Function<Consumer<Boolean>, GrokCaptureEx
/**
* Build an extract that has access to the "native" type of the extracter
* match. This means that patterns like {@code %{NUMBER:bytes:float}} has
* access to an actual {@link float}. Extracters returned from this method
* should be stateless stateless and can be reused. Pathological implementations
* access to an actual float. Extracters returned from this method
* should be stateless and can be reused. Pathological implementations
* of the {@code map} parameter could violate this, but the caller should
* take care to stay sane.
* <p>
Expand Down Expand Up @@ -144,27 +144,27 @@ public interface NativeExtracterMap<T> {
T forString(Function<Consumer<String>, GrokCaptureExtracter> buildExtracter);

/**
* Called when the native type is an {@link int}.
* Called when the native type is an int.
*/
T forInt(Function<IntConsumer, GrokCaptureExtracter> buildExtracter);

/**
* Called when the native type is an {@link long}.
* Called when the native type is an long.
*/
T forLong(Function<LongConsumer, GrokCaptureExtracter> buildExtracter);

/**
* Called when the native type is an {@link float}.
* Called when the native type is an float.
*/
T forFloat(Function<FloatConsumer, GrokCaptureExtracter> buildExtracter);

/**
* Called when the native type is an {@link double}.
* Called when the native type is an double.
*/
T forDouble(Function<DoubleConsumer, GrokCaptureExtracter> buildExtracter);

/**
* Called when the native type is an {@link boolean}.
* Called when the native type is an boolean.
*/
T forBoolean(Function<Consumer<Boolean>, GrokCaptureExtracter> buildExtracter);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/

package org.opensearch.cache.common.tier;

import org.opensearch.common.cache.CacheType;
import org.opensearch.common.cache.settings.CacheSettings;
import org.opensearch.common.cache.store.OpenSearchOnHeapCache;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.util.FeatureFlags;
import org.opensearch.test.OpenSearchIntegTestCase;

public class TieredSpilloverCacheBaseIT extends OpenSearchIntegTestCase {

public Settings defaultSettings(String onHeapCacheSizeInBytesOrPercentage, int numberOfSegments) {
return Settings.builder()
.put(FeatureFlags.PLUGGABLE_CACHE, "true")
.put(
CacheSettings.getConcreteStoreNameSettingForCacheType(CacheType.INDICES_REQUEST_CACHE).getKey(),
TieredSpilloverCache.TieredSpilloverCacheFactory.TIERED_SPILLOVER_CACHE_NAME
)
.put(
TieredSpilloverCacheSettings.TIERED_SPILLOVER_ONHEAP_STORE_NAME.getConcreteSettingForNamespace(
CacheType.INDICES_REQUEST_CACHE.getSettingPrefix()
).getKey(),
OpenSearchOnHeapCache.OpenSearchOnHeapCacheFactory.NAME
)
.put(
TieredSpilloverCacheSettings.TIERED_SPILLOVER_DISK_STORE_NAME.getConcreteSettingForNamespace(
CacheType.INDICES_REQUEST_CACHE.getSettingPrefix()
).getKey(),
MockDiskCache.MockDiskCacheFactory.NAME
)
.put(
TieredSpilloverCacheSettings.TIERED_SPILLOVER_SEGMENTS.getConcreteSettingForNamespace(
CacheType.INDICES_REQUEST_CACHE.getSettingPrefix()
).getKey(),
numberOfSegments
)
.put(
TieredSpilloverCacheSettings.TIERED_SPILLOVER_ONHEAP_STORE_SIZE.getConcreteSettingForNamespace(
CacheType.INDICES_REQUEST_CACHE.getSettingPrefix()
).getKey(),
onHeapCacheSizeInBytesOrPercentage
)
.build();
}

public int getNumberOfSegments() {
return randomFrom(1, 2, 4, 8, 16, 64, 128, 256);
}
}
Loading