Class StreamWriter.Builder
- java.lang.Object
-
- com.google.cloud.bigquery.storage.v1.StreamWriter.Builder
-
- Enclosing class:
- StreamWriter
public static final class StreamWriter.Builder extends Object
A builder ofStreamWriter
s.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamWriter
build()
Builds theStreamWriterV2
.StreamWriter.Builder
setChannelProvider(com.google.api.gax.rpc.TransportChannelProvider channelProvider)
ChannelProvider
to use to create Channels, which must point at Cloud BigQuery Storage API endpoint.StreamWriter.Builder
setCompressorName(String compressorName)
StreamWriter.Builder
setCredentialsProvider(com.google.api.gax.core.CredentialsProvider credentialsProvider)
CredentialsProvider
to use to create Credentials to authenticate calls.StreamWriter.Builder
setDefaultMissingValueInterpretation(AppendRowsRequest.MissingValueInterpretation defaultMissingValueInterpretation)
Sets the default missing value interpretation value if the column is not presented in the missing_value_interpretations map.StreamWriter.Builder
setEnableConnectionPool(boolean enableConnectionPool)
Enable multiplexing for this writer.StreamWriter.Builder
setEndpoint(String endpoint)
Gives the ability to override the gRPC endpoint.StreamWriter.Builder
setExecutorProvider(com.google.api.gax.core.ExecutorProvider executorProvider)
ExecutorProvider
to use to create Executor to run background jobs.StreamWriter.Builder
setLimitExceededBehavior(com.google.api.gax.batching.FlowController.LimitExceededBehavior limitExceededBehavior)
Sets the limit exceeded behavior.StreamWriter.Builder
setLocation(String location)
Location of the table this stream writer is targeting.StreamWriter.Builder
setMaxInflightBytes(long value)
StreamWriter.Builder
setMaxInflightRequests(long value)
StreamWriter.Builder
setMaxRetryDuration(Duration maxRetryDuration)
StreamWriter.Builder
setTraceId(String traceId)
Sets traceId for debuging purpose.StreamWriter.Builder
setWriterSchema(ProtoSchema writerSchema)
Sets the proto schema of the rows.
-
-
-
Method Detail
-
setWriterSchema
public StreamWriter.Builder setWriterSchema(ProtoSchema writerSchema)
Sets the proto schema of the rows.
-
setMaxInflightRequests
public StreamWriter.Builder setMaxInflightRequests(long value)
-
setMaxInflightBytes
public StreamWriter.Builder setMaxInflightBytes(long value)
-
setEndpoint
public StreamWriter.Builder setEndpoint(String endpoint)
Gives the ability to override the gRPC endpoint.
-
setEnableConnectionPool
public StreamWriter.Builder setEnableConnectionPool(boolean enableConnectionPool)
Enable multiplexing for this writer. In multiplexing mode tables will share the same connection if possible until the connection is overwhelmed.- Parameters:
enableConnectionPool
-- Returns:
- Builder
-
setChannelProvider
public StreamWriter.Builder setChannelProvider(com.google.api.gax.rpc.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
InstantiatingGrpcChannelProvider.Builder.setPoolSize(int)
.
-
setCredentialsProvider
public StreamWriter.Builder setCredentialsProvider(com.google.api.gax.core.CredentialsProvider credentialsProvider)
CredentialsProvider
to use to create Credentials to authenticate calls.
-
setExecutorProvider
public StreamWriter.Builder setExecutorProvider(com.google.api.gax.core.ExecutorProvider executorProvider)
ExecutorProvider
to use to create Executor to run background jobs.
-
setTraceId
public StreamWriter.Builder setTraceId(String traceId)
Sets traceId for debuging purpose. TraceId must follow the format of CustomerDomain:DebugString, e.g. DATAFLOW:job_id_x.
-
setLocation
public StreamWriter.Builder setLocation(String location)
Location of the table this stream writer is targeting.
-
setLimitExceededBehavior
public StreamWriter.Builder setLimitExceededBehavior(com.google.api.gax.batching.FlowController.LimitExceededBehavior limitExceededBehavior) throws io.grpc.StatusRuntimeException
Sets the limit exceeded behavior.- Parameters:
limitExceededBehavior
-- Returns:
- Throws:
io.grpc.StatusRuntimeException
-
setMaxRetryDuration
public StreamWriter.Builder setMaxRetryDuration(Duration maxRetryDuration)
-
setCompressorName
public StreamWriter.Builder setCompressorName(String compressorName)
-
setDefaultMissingValueInterpretation
public StreamWriter.Builder setDefaultMissingValueInterpretation(AppendRowsRequest.MissingValueInterpretation defaultMissingValueInterpretation)
Sets the default missing value interpretation value if the column is not presented in the missing_value_interpretations map.
-
build
public StreamWriter build() throws IOException
Builds theStreamWriterV2
.- Throws:
IOException
-
-