Class BigQueryServicesImpl.WriteStreamServiceImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse> commitWriteStreams​(java.lang.String tableUrn, java.lang.Iterable<java.lang.String> writeStreamNames)
      Commit write streams of type PENDING.
      com.google.cloud.bigquery.storage.v1.WriteStream createWriteStream​(java.lang.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​(java.lang.String streamName)
      Finalize a write stream.
      com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.FlushRowsResponse> flush​(java.lang.String streamName, long flushOffset)
      Flush a given stream up to the given offset.
      BigQueryServices.StreamAppendClient getStreamAppendClient​(java.lang.String streamName, com.google.protobuf.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.TableSchema getWriteStreamSchema​(java.lang.String writeStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WriteStreamServiceImpl

        public WriteStreamServiceImpl​(BigQueryOptions bqOptions)
    • Method Detail

      • createWriteStream

        public com.google.cloud.bigquery.storage.v1.WriteStream createWriteStream​(java.lang.String tableUrn,
                                                                                  com.google.cloud.bigquery.storage.v1.WriteStream.Type type)
                                                                           throws java.io.IOException
        Description copied from interface: BigQueryServices.WriteStreamService
        Create a Write Stream for use with the Storage Write API.
        Specified by:
        createWriteStream in interface BigQueryServices.WriteStreamService
        Throws:
        java.io.IOException
      • getStreamAppendClient

        public BigQueryServices.StreamAppendClient getStreamAppendClient​(java.lang.String streamName,
                                                                         com.google.protobuf.DescriptorProtos.DescriptorProto descriptor,
                                                                         boolean useConnectionPool,
                                                                         com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation missingValueInterpretation)
                                                                  throws java.lang.Exception
        Description copied from interface: BigQueryServices.WriteStreamService
        Create an append client for a given Storage API write stream. The stream must be created first.
        Specified by:
        getStreamAppendClient in interface BigQueryServices.WriteStreamService
        Throws:
        java.lang.Exception
      • flush

        public com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.FlushRowsResponse> flush​(java.lang.String streamName,
                                                                                                           long flushOffset)
                                                                                                    throws java.io.IOException,
                                                                                                           java.lang.InterruptedException
        Description copied from interface: BigQueryServices.WriteStreamService
        Flush a given stream up to the given offset. The stream must have type BUFFERED.
        Specified by:
        flush in interface BigQueryServices.WriteStreamService
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • commitWriteStreams

        public com.google.api.core.ApiFuture<com.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse> commitWriteStreams​(java.lang.String tableUrn,
                                                                                                                                      java.lang.Iterable<java.lang.String> writeStreamNames)
        Description copied from interface: BigQueryServices.WriteStreamService
        Commit write streams of type PENDING. The streams must be finalized before committing.
        Specified by:
        commitWriteStreams in interface BigQueryServices.WriteStreamService
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception