Class FakeJobService

java.lang.Object
org.apache.beam.sdk.io.gcp.testing.FakeJobService
All Implemented Interfaces:
Serializable, AutoCloseable, BigQueryServices.JobService

@Internal public class FakeJobService extends Object implements BigQueryServices.JobService, Serializable
A fake implementation of BigQuery's job service.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    FakeJobService(int numFailures)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    com.google.api.services.bigquery.model.JobStatistics
    dryRunQuery(String projectId, com.google.api.services.bigquery.model.JobConfigurationQuery query, String location)
    Dry runs the query in the given project.
    void
    expectDryRunQuery(String projectId, String query, com.google.api.services.bigquery.model.JobStatistics result)
     
    Collection<com.google.api.services.bigquery.model.Job>
     
    com.google.api.services.bigquery.model.Job
    getJob(com.google.api.services.bigquery.model.JobReference jobRef)
    Gets the specified Job by the given JobReference.
    int
     
    com.google.api.services.bigquery.model.Job
    pollJob(com.google.api.services.bigquery.model.JobReference jobRef, int maxAttempts)
    Waits for the job is Done, and returns the job.
    void
    setNumFailuresExpected(int numFailuresExpected)
     
    static void
     
    void
    startCopyJob(com.google.api.services.bigquery.model.JobReference jobRef, com.google.api.services.bigquery.model.JobConfigurationTableCopy copyConfig)
    Start a BigQuery copy job.
    void
    startExtractJob(com.google.api.services.bigquery.model.JobReference jobRef, com.google.api.services.bigquery.model.JobConfigurationExtract extractConfig)
    Start a BigQuery extract job.
    void
    startLoadJob(com.google.api.services.bigquery.model.JobReference jobRef, com.google.api.services.bigquery.model.JobConfigurationLoad loadConfig)
    Start a BigQuery load job.
    void
    startLoadJob(com.google.api.services.bigquery.model.JobReference jobRef, com.google.api.services.bigquery.model.JobConfigurationLoad loadConfig, com.google.api.client.http.AbstractInputStreamContent streamContent)
    Start a BigQuery load job with stream content.
    void
    startQueryJob(com.google.api.services.bigquery.model.JobReference jobRef, com.google.api.services.bigquery.model.JobConfigurationQuery query)
    Start a BigQuery query job.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait