Max initial number of streams. If unset or zero, the server will
provide a value of streams so as to produce reasonable throughput. Must be
non-negative. The number of streams may be lower than the requested number,
depending on the amount parallelism that is reasonable for the table.
There is a default system max limit of 1,000.
This must be greater than or equal to preferred_min_stream_count.
Typically, clients should either leave this unset to let the system to
determine an upper bound OR set this a size for the maximum "units of work"
it can gracefully handle.
The minimum preferred stream count. This parameter can be used to inform
the service that there is a desired lower bound on the number of streams.
This is typically a target parallelism of the client (e.g. a Spark
cluster with N-workers would set this to a low multiple of N to ensure
good cluster utilization).
The system will make a best effort to provide at least this number of
streams, but in some cases might provide less.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-18 UTC."],[],[],null,["# Interface CreateReadSessionRequestOrBuilder (3.16.2)\n\nVersion latestkeyboard_arrow_down\n\n- [3.16.2 (latest)](/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.16.1](/java/docs/reference/google-cloud-bigquerystorage/3.16.1/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.15.3](/java/docs/reference/google-cloud-bigquerystorage/3.15.3/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.14.1](/java/docs/reference/google-cloud-bigquerystorage/3.14.1/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.12.0](/java/docs/reference/google-cloud-bigquerystorage/3.12.0/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.11.4](/java/docs/reference/google-cloud-bigquerystorage/3.11.4/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.10.3](/java/docs/reference/google-cloud-bigquerystorage/3.10.3/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.9.3](/java/docs/reference/google-cloud-bigquerystorage/3.9.3/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.8.0](/java/docs/reference/google-cloud-bigquerystorage/3.8.0/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.6.1](/java/docs/reference/google-cloud-bigquerystorage/3.6.1/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.5.2](/java/docs/reference/google-cloud-bigquerystorage/3.5.2/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.4.0](/java/docs/reference/google-cloud-bigquerystorage/3.4.0/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.3.1](/java/docs/reference/google-cloud-bigquerystorage/3.3.1/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.2.0](/java/docs/reference/google-cloud-bigquerystorage/3.2.0/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.1.0](/java/docs/reference/google-cloud-bigquerystorage/3.1.0/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [3.0.1](/java/docs/reference/google-cloud-bigquerystorage/3.0.1/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [2.47.0](/java/docs/reference/google-cloud-bigquerystorage/2.47.0/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [2.45.0](/java/docs/reference/google-cloud-bigquerystorage/2.45.0/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [2.44.1](/java/docs/reference/google-cloud-bigquerystorage/2.44.1/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder)\n- [2.43.0](/java/docs/reference/google-cloud-bigquerystorage/2.43.0/com.google.cloud.bigquery.storage.v1.CreateReadSessionRequestOrBuilder) \n\n public interface CreateReadSessionRequestOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getMaxStreamCount()\n\n public abstract int getMaxStreamCount()\n\nMax initial number of streams. If unset or zero, the server will\nprovide a value of streams so as to produce reasonable throughput. Must be\nnon-negative. The number of streams may be lower than the requested number,\ndepending on the amount parallelism that is reasonable for the table.\nThere is a default system max limit of 1,000.\n\nThis must be greater than or equal to preferred_min_stream_count.\nTypically, clients should either leave this unset to let the system to\ndetermine an upper bound OR set this a size for the maximum \"units of work\"\nit can gracefully handle.\n\n`int32 max_stream_count = 3;`\n\n### getParent()\n\n public abstract String getParent()\n\nRequired. The request project that owns the session, in the form of\n`projects/{project_id}`.\n\n`\nstring parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }\n`\n\n### getParentBytes()\n\n public abstract ByteString getParentBytes()\n\nRequired. The request project that owns the session, in the form of\n`projects/{project_id}`.\n\n`\nstring parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }\n`\n\n### getPreferredMinStreamCount()\n\n public abstract int getPreferredMinStreamCount()\n\nThe minimum preferred stream count. This parameter can be used to inform\nthe service that there is a desired lower bound on the number of streams.\nThis is typically a target parallelism of the client (e.g. a Spark\ncluster with N-workers would set this to a low multiple of N to ensure\ngood cluster utilization).\n\nThe system will make a best effort to provide at least this number of\nstreams, but in some cases might provide less.\n\n`int32 preferred_min_stream_count = 4;`\n\n### getReadSession()\n\n public abstract ReadSession getReadSession()\n\nRequired. Session to be created.\n\n`\n.google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### getReadSessionOrBuilder()\n\n public abstract ReadSessionOrBuilder getReadSessionOrBuilder()\n\nRequired. Session to be created.\n\n`\n.google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];\n`\n\n### hasReadSession()\n\n public abstract boolean hasReadSession()\n\nRequired. Session to be created.\n\n`\n.google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED];\n`"]]