@Experimental(value=SOURCE_SINK) public class FakeJobService extends java.lang.Object implements BigQueryServices.JobService, java.io.Serializable
Constructor and Description |
---|
FakeJobService() |
FakeJobService(int numFailures) |
Modifier and Type | Method and Description |
---|---|
JobStatistics |
dryRunQuery(java.lang.String projectId,
JobConfigurationQuery query,
java.lang.String location)
Dry runs the query in the given project.
|
void |
expectDryRunQuery(java.lang.String projectId,
java.lang.String query,
JobStatistics result) |
java.util.Collection<Job> |
getAllJobs() |
Job |
getJob(JobReference jobRef)
Gets the specified
Job by the given JobReference . |
int |
getNumExtractJobCalls() |
Job |
pollJob(JobReference jobRef,
int maxAttempts)
Waits for the job is Done, and returns the job.
|
void |
setNumFailuresExpected(int numFailuresExpected) |
static void |
setUp() |
void |
startCopyJob(JobReference jobRef,
JobConfigurationTableCopy copyConfig)
Start a BigQuery copy job.
|
void |
startExtractJob(JobReference jobRef,
JobConfigurationExtract extractConfig)
Start a BigQuery extract job.
|
void |
startLoadJob(JobReference jobRef,
JobConfigurationLoad loadConfig)
Start a BigQuery load job.
|
void |
startQueryJob(JobReference jobRef,
JobConfigurationQuery query)
Start a BigQuery query job.
|
public FakeJobService()
public FakeJobService(int numFailures)
public void setNumFailuresExpected(int numFailuresExpected)
public static void setUp()
public void startLoadJob(JobReference jobRef, JobConfigurationLoad loadConfig) throws java.io.IOException
BigQueryServices.JobService
startLoadJob
in interface BigQueryServices.JobService
java.io.IOException
public void startExtractJob(JobReference jobRef, JobConfigurationExtract extractConfig) throws java.io.IOException
BigQueryServices.JobService
startExtractJob
in interface BigQueryServices.JobService
java.io.IOException
public int getNumExtractJobCalls()
public void startQueryJob(JobReference jobRef, JobConfigurationQuery query)
BigQueryServices.JobService
startQueryJob
in interface BigQueryServices.JobService
public void startCopyJob(JobReference jobRef, JobConfigurationTableCopy copyConfig) throws java.io.IOException
BigQueryServices.JobService
startCopyJob
in interface BigQueryServices.JobService
java.io.IOException
public Job pollJob(JobReference jobRef, int maxAttempts) throws java.lang.InterruptedException
BigQueryServices.JobService
Returns null if the maxAttempts
retries reached.
pollJob
in interface BigQueryServices.JobService
java.lang.InterruptedException
public void expectDryRunQuery(java.lang.String projectId, java.lang.String query, JobStatistics result)
public JobStatistics dryRunQuery(java.lang.String projectId, JobConfigurationQuery query, java.lang.String location)
BigQueryServices.JobService
dryRunQuery
in interface BigQueryServices.JobService
public java.util.Collection<Job> getAllJobs()
public Job getJob(JobReference jobRef)
BigQueryServices.JobService
getJob
in interface BigQueryServices.JobService