java.lang.Object
io.github.flink.gcp.connector.testutils.bigquery.RealGcs

@Internal public final class RealGcs extends Object
Cloud Storage plumbing for the gated FILE_LOADS ITCases: the BQ_IT_GCS_BUCKET variable, a client over the same application-default credentials RealBigQuery uses, and staging-prefix upload, listing and cleanup.

A sibling of RealBigQuery rather than part of it: only FILE_LOADS stages anything, so the BigQuery helper knows nothing about a bucket. It sits beside it all the same, because both are plumbing over a gate variable and the three gates are worth finding in one place.

Named for the product and not RealStorage: sink.storage in the BigQuery connector means the Storage Write API, which this is not.

  • Method Details

    • uri

      public static String uri(String path)
      The gs:// URI of path in the staging bucket, for stagingPath(...).
    • upload

      public static void upload(String path, byte[] content)
      Uploads content at path in the staging bucket.
    • list

      public static Iterable<com.google.cloud.storage.Blob> list(String prefix)
      The objects currently under prefix.
    • deletePrefix

      public static void deletePrefix(String prefix)
      Deletes everything under prefix; a successful load leaves nothing behind.