public class ConnectionWorker implements AutoCloseable
A BigQuery Stream Writer that can be used to write data into BigQuery Table.
TODO: Support batching.
TODO: support updated schema
Implements
AutoCloseableStatic Methods
getApiMaxRequestBytes()
public static long getApiMaxRequestBytes()
The maximum size of one request. Defined by the API.
Type | Description |
long |
Constructors
ConnectionWorker(String streamName, ProtoSchema writerSchema, long maxInflightRequests, long maxInflightBytes, FlowController.LimitExceededBehavior limitExceededBehavior, String traceId, BigQueryWriteClient client, boolean ownsBigQueryWriteClient)
public ConnectionWorker(String streamName, ProtoSchema writerSchema, long maxInflightRequests, long maxInflightBytes, FlowController.LimitExceededBehavior limitExceededBehavior, String traceId, BigQueryWriteClient client, boolean ownsBigQueryWriteClient)
Name | Description |
streamName | String |
writerSchema | ProtoSchema |
maxInflightRequests | long |
maxInflightBytes | long |
limitExceededBehavior | LimitExceededBehavior |
traceId | String |
client | BigQueryWriteClient |
ownsBigQueryWriteClient | boolean |
Methods
close()
public void close()
Close the stream writer. Shut down all resources.
getInflightWaitSeconds()
public long getInflightWaitSeconds()
Type | Description |
long |
getLoad()
public ConnectionWorker.Load getLoad()
Returns the current workload of this worker.
Type | Description |
ConnectionWorker.Load |
getWriterId()
public String getWriterId()
Type | Description |
String | a unique Id for the writer. |