use of com.google.api.services.bigquery.model.JobConfiguration in project beam by apache.
the class FakeJobService method startExtractJob.
@Override
public void startExtractJob(JobReference jobRef, JobConfigurationExtract extractConfig) throws InterruptedException, IOException {
checkArgument(extractConfig.getDestinationFormat().equals("AVRO"), "Only extract to AVRO is supported");
synchronized (allJobs) {
++numExtractJobCalls;
Job job = new Job();
job.setJobReference(jobRef);
job.setConfiguration(new JobConfiguration().setExtract(extractConfig));
job.setKind(" bigquery#job");
job.setStatus(new JobStatus().setState("PENDING"));
allJobs.put(jobRef.getProjectId(), jobRef.getJobId(), new JobInfo(job));
}
}
use of com.google.api.services.bigquery.model.JobConfiguration in project beam by apache.
the class FakeJobService method startQueryJob.
@Override
public void startQueryJob(JobReference jobRef, JobConfigurationQuery query) {
synchronized (allJobs) {
Job job = new Job();
job.setJobReference(jobRef);
job.setConfiguration(new JobConfiguration().setQuery(query));
job.setKind(" bigquery#job");
job.setStatus(new JobStatus().setState("PENDING"));
allJobs.put(jobRef.getProjectId(), jobRef.getJobId(), new JobInfo(job));
}
}
Aggregations