Search in sources :

Example 31 with JobStatus

use of com.google.api.services.bigquery.model.JobStatus 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));
    }
}
Also used : JobStatus(com.google.api.services.bigquery.model.JobStatus) Job(com.google.api.services.bigquery.model.Job) JobConfiguration(com.google.api.services.bigquery.model.JobConfiguration)

Aggregations

JobStatus (com.google.api.services.bigquery.model.JobStatus)31 Job (com.google.api.services.bigquery.model.Job)23 TableReference (com.google.api.services.bigquery.model.TableReference)12 TableRow (com.google.api.services.bigquery.model.TableRow)12 JobConfiguration (com.google.api.services.bigquery.model.JobConfiguration)11 Table (com.google.api.services.bigquery.model.Table)10 Test (org.junit.Test)10 JobReference (com.google.api.services.bigquery.model.JobReference)8 JobStatistics (com.google.api.services.bigquery.model.JobStatistics)8 TableSchema (com.google.api.services.bigquery.model.TableSchema)8 ErrorProto (com.google.api.services.bigquery.model.ErrorProto)7 HashBasedTable (com.google.common.collect.HashBasedTable)6 JobStatistics4 (com.google.api.services.bigquery.model.JobStatistics4)5 JobStatistics2 (com.google.api.services.bigquery.model.JobStatistics2)4 IOException (java.io.IOException)4 ResourceId (org.apache.beam.sdk.io.fs.ResourceId)4 CreateDisposition (org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO.Write.CreateDisposition)4 WriteDisposition (org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO.Write.WriteDisposition)4 JobServiceImpl (org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl.JobServiceImpl)4 TableFieldSchema (com.google.api.services.bigquery.model.TableFieldSchema)3