Class JsonStreamWriter.Builder
java.lang.Object
com.google.cloud.bigquery.storage.v1.JsonStreamWriter.Builder
- Enclosing class:
- JsonStreamWriter
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds JsonStreamWriterStream name on the builder.setChannelProvider
(com.google.api.gax.rpc.TransportChannelProvider channelProvider) Setter for the underlying StreamWriter's TransportChannelProvider.setCompressorName
(String compressorName) Sets the compression to use for the calls.setCredentialsProvider
(com.google.api.gax.core.CredentialsProvider credentialsProvider) Setter for the underlying StreamWriter's CredentialsProvider.setEnableConnectionPool
(boolean enableConnectionPool) Enable multiplexing for this writer.setEndpoint
(String endpoint) Setter for the underlying StreamWriter's Endpoint.setExecutorProvider
(com.google.api.gax.core.ExecutorProvider executorProvider) Setter for the underlying StreamWriter's ExecutorProvider.setFlowControlSettings
(com.google.api.gax.batching.FlowControlSettings flowControlSettings) Setter for the underlying StreamWriter's FlowControlSettings.setIgnoreUnknownFields
(boolean ignoreUnknownFields) Setter for a ignoreUnkownFields, if true, unknown Json fields to BigQuery will be ignored instead of error out.setLocation
(String location) Location of the table this stream writer is targeting.setReconnectAfter10M
(boolean reconnectAfter10M) This parameter is not used.setTraceId
(String traceId) Setter for a traceId to help identify traffic origin.
-
Method Details
-
setChannelProvider
public JsonStreamWriter.Builder setChannelProvider(com.google.api.gax.rpc.TransportChannelProvider channelProvider) Setter for the underlying StreamWriter's TransportChannelProvider.- Parameters:
channelProvider
-- Returns:
- Builder
-
setCredentialsProvider
public JsonStreamWriter.Builder setCredentialsProvider(com.google.api.gax.core.CredentialsProvider credentialsProvider) Setter for the underlying StreamWriter's CredentialsProvider.- Parameters:
credentialsProvider
-- Returns:
- Builder
-
setExecutorProvider
public JsonStreamWriter.Builder setExecutorProvider(com.google.api.gax.core.ExecutorProvider executorProvider) Setter for the underlying StreamWriter's ExecutorProvider.- Parameters:
executorProvider
-- Returns:
-
setFlowControlSettings
public JsonStreamWriter.Builder setFlowControlSettings(com.google.api.gax.batching.FlowControlSettings flowControlSettings) Setter for the underlying StreamWriter's FlowControlSettings.- Parameters:
flowControlSettings
-- Returns:
- Builder
-
getStreamName
Stream name on the builder.- Returns:
- Builder
-
setEndpoint
Setter for the underlying StreamWriter's Endpoint.- Parameters:
endpoint
-- Returns:
- Builder
-
setTraceId
Setter for a traceId to help identify traffic origin.- Parameters:
traceId
-- Returns:
- Builder
-
setIgnoreUnknownFields
Setter for a ignoreUnkownFields, if true, unknown Json fields to BigQuery will be ignored instead of error out.- Parameters:
ignoreUnknownFields
-- Returns:
- Builder
-
setReconnectAfter10M
This parameter is not used. It will be removed soon. -
setEnableConnectionPool
Enable multiplexing for this writer. In multiplexing mode tables will share the same connection if possible until the connection is overwhelmed. This feature is still under development, please contact write api team before using.- Parameters:
enableConnectionPool
-- Returns:
- Builder
-
setLocation
Location of the table this stream writer is targeting. Connection pools are shared by location.- Parameters:
location
-- Returns:
- Builder
-
setCompressorName
Sets the compression to use for the calls. The compressor must be of type gzip.- Parameters:
compressorName
-- Returns:
- Builder
-
build
public JsonStreamWriter build() throws com.google.protobuf.Descriptors.DescriptorValidationException, IllegalArgumentException, IOException, InterruptedExceptionBuilds JsonStreamWriter- Returns:
- JsonStreamWriter
- Throws:
com.google.protobuf.Descriptors.DescriptorValidationException
IllegalArgumentException
IOException
InterruptedException
-