Class BigQueryServicesImpl.WriteStreamServiceImpl
java.lang.Object
org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl.WriteStreamServiceImpl
- All Implemented Interfaces:
 AutoCloseable,BigQueryServices.WriteStreamService
- Enclosing class:
 BigQueryServicesImpl
public static class BigQueryServicesImpl.WriteStreamServiceImpl
extends Object
implements BigQueryServices.WriteStreamService
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidclose()com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse> commitWriteStreams(String tableUrn, Iterable<String> writeStreamNames) Commit write streams of type PENDING.com.google.cloud.bigquery.storage.v1.WriteStreamcreateWriteStream(String tableUrn, com.google.cloud.bigquery.storage.v1.WriteStream.Type type) Create a Write Stream for use with the Storage Write API.com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse> finalizeWriteStream(String streamName) Finalize a write stream.com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.FlushRowsResponse> Flush a given stream up to the given offset.getStreamAppendClient(String streamName, DescriptorProtos.DescriptorProto descriptor, boolean useConnectionPool, com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation missingValueInterpretation) Create an append client for a given Storage API write stream.@Nullable com.google.cloud.bigquery.storage.v1.TableSchemagetWriteStreamSchema(String writeStream)  
- 
Constructor Details
- 
WriteStreamServiceImpl
 
 - 
 - 
Method Details
- 
createWriteStream
public com.google.cloud.bigquery.storage.v1.WriteStream createWriteStream(String tableUrn, com.google.cloud.bigquery.storage.v1.WriteStream.Type type) throws IOException Description copied from interface:BigQueryServices.WriteStreamServiceCreate a Write Stream for use with the Storage Write API.- Specified by:
 createWriteStreamin interfaceBigQueryServices.WriteStreamService- Throws:
 IOException
 - 
getWriteStreamSchema
public @Nullable com.google.cloud.bigquery.storage.v1.TableSchema getWriteStreamSchema(String writeStream) - Specified by:
 getWriteStreamSchemain interfaceBigQueryServices.WriteStreamService
 - 
getStreamAppendClient
public BigQueryServices.StreamAppendClient getStreamAppendClient(String streamName, DescriptorProtos.DescriptorProto descriptor, boolean useConnectionPool, com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation missingValueInterpretation) throws Exception Description copied from interface:BigQueryServices.WriteStreamServiceCreate an append client for a given Storage API write stream. The stream must be created first.- Specified by:
 getStreamAppendClientin interfaceBigQueryServices.WriteStreamService- Throws:
 Exception
 - 
flush
public com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.FlushRowsResponse> flush(String streamName, long flushOffset) throws IOException, InterruptedException Description copied from interface:BigQueryServices.WriteStreamServiceFlush a given stream up to the given offset. The stream must have type BUFFERED.- Specified by:
 flushin interfaceBigQueryServices.WriteStreamService- Throws:
 IOExceptionInterruptedException
 - 
finalizeWriteStream
public com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse> finalizeWriteStream(String streamName) Description copied from interface:BigQueryServices.WriteStreamServiceFinalize a write stream. After finalization, no more records can be appended to the stream.- Specified by:
 finalizeWriteStreamin interfaceBigQueryServices.WriteStreamService
 - 
commitWriteStreams
public com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse> commitWriteStreams(String tableUrn, Iterable<String> writeStreamNames) Description copied from interface:BigQueryServices.WriteStreamServiceCommit write streams of type PENDING. The streams must be finalized before committing.- Specified by:
 commitWriteStreamsin interfaceBigQueryServices.WriteStreamService
 - 
close
- Specified by:
 closein interfaceAutoCloseable- Throws:
 Exception
 
 -