Class StreamWriterV2.Builder (2.47.0)

public static final class StreamWriterV2.Builder

A builder of StreamWriterV2s.

Inheritance

java.lang.Object > StreamWriterV2.Builder

Methods

build()

public StreamWriterV2 build()

Builds the StreamWriterV2.

Returns
TypeDescription
StreamWriterV2
Exceptions
TypeDescription
IOException

setChannelProvider(TransportChannelProvider channelProvider)

public StreamWriterV2.Builder setChannelProvider(TransportChannelProvider channelProvider)

ChannelProvider to use to create Channels, which must point at Cloud BigQuery Storage API endpoint.

For performance, this client benefits from having multiple underlying connections. See com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.Builder#setPoolSize(int).

Parameter
NameDescription
channelProviderTransportChannelProvider
Returns
TypeDescription
StreamWriterV2.Builder

setCredentialsProvider(CredentialsProvider credentialsProvider)

public StreamWriterV2.Builder setCredentialsProvider(CredentialsProvider credentialsProvider)

CredentialsProvider to use to create Credentials to authenticate calls.

Parameter
NameDescription
credentialsProviderCredentialsProvider
Returns
TypeDescription
StreamWriterV2.Builder

setEndpoint(String endpoint)

public StreamWriterV2.Builder setEndpoint(String endpoint)

Gives the ability to override the gRPC endpoint.

Parameter
NameDescription
endpointString
Returns
TypeDescription
StreamWriterV2.Builder

setMaxInflightBytes(long value)

public StreamWriterV2.Builder setMaxInflightBytes(long value)
Parameter
NameDescription
valuelong
Returns
TypeDescription
StreamWriterV2.Builder

setMaxInflightRequests(long value)

public StreamWriterV2.Builder setMaxInflightRequests(long value)
Parameter
NameDescription
valuelong
Returns
TypeDescription
StreamWriterV2.Builder

setTraceId(String traceId)

public StreamWriterV2.Builder setTraceId(String traceId)

Sets traceId for debuging purpose. TraceId must follow the format of CustomerDomain:DebugString, e.g. DATAFLOW:job_id_x.

Parameter
NameDescription
traceIdString
Returns
TypeDescription
StreamWriterV2.Builder

setWriterSchema(ProtoSchema writerSchema)

public StreamWriterV2.Builder setWriterSchema(ProtoSchema writerSchema)

Sets the proto schema of the rows.

Parameter
NameDescription
writerSchemaProtoSchema
Returns
TypeDescription
StreamWriterV2.Builder