Class ConnectionWorker (2.28.1)

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

Inheritance

java.lang.Object > ConnectionWorker

Implements

AutoCloseable

Static Methods

getApiMaxRequestBytes()

public static long getApiMaxRequestBytes()

The maximum size of one request. Defined by the API.

Returns
TypeDescription
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)
Parameters
NameDescription
streamNameString
writerSchemaProtoSchema
maxInflightRequestslong
maxInflightByteslong
limitExceededBehaviorLimitExceededBehavior
traceIdString
clientBigQueryWriteClient
ownsBigQueryWriteClientboolean

Methods

close()

public void close()

Close the stream writer. Shut down all resources.

getInflightWaitSeconds()

public long getInflightWaitSeconds()
Returns
TypeDescription
long

getLoad()

public ConnectionWorker.Load getLoad()

Returns the current workload of this worker.

Returns
TypeDescription
ConnectionWorker.Load

getWriterId()

public String getWriterId()
Returns
TypeDescription
String

a unique Id for the writer.