Skip to content

Add JobInfo hierarcy and related classes#442

Merged
mziccard merged 1 commit intogoogleapis:bigqueryfrom
mziccard:bigquery
Dec 9, 2015
Merged

Add JobInfo hierarcy and related classes#442
mziccard merged 1 commit intogoogleapis:bigqueryfrom
mziccard:bigquery

Conversation

@mziccard
Copy link
Contributor

@mziccard mziccard commented Dec 7, 2015

This PR adds model classes for jobs and related entities:

  • Abstract JobInfo with subclasses: CopyJobInfo, ExtractJobInfo, LoadJobInfo and QueryJobInfo one for each type of job
  • JobStatus and BigQueryError to represent the job's status (and possible errors)
  • JobStatistics with subclasses ExtractStatistics, LoadStatistics and QueryStatistics

Unit tests are added for each class.

@mziccard mziccard added the api: bigquery Issues related to the BigQuery API. label Dec 7, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 7, 2015

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@mziccard
Copy link
Contributor Author

mziccard commented Dec 7, 2015

Thanks @ajkannan for the comments I fixed all of them (hope so:)) in place.

This comment was marked as spam.

@aozarov
Copy link
Contributor

aozarov commented Dec 7, 2015

I am still going over the code, will ping you when done.
In the mean time if you want to cleanup the following check-style warnings:

Starting audit...
src/test/java/com/google/gcloud/bigquery/ExtractJobInfoTest.java:43:35: warning: Name 'WRITE_DISPOSITION' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/LoadJobInfoTest.java:49:35: warning: Name 'WRITE_DISPOSITION' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/TableInfoTest.java:101:44: warning: Name 'USER_DEFINED_FUNCTIONS' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java:29: warning: Wrong order for com.google.gcloud.bigquery.JobInfo.WriteDisposition import. Use /google/src/head/depot/google3/tools/java/sort_java_imports.py to automatically sort your imports.
src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java:75:35: warning: Name 'WRITE_DISPOSITION' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java:76:27: warning: Name 'PRIORTIY' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java:77:26: warning: Name 'ALLOW_LARGE_RESULTS' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java:78:26: warning: Name 'USE_QUERY_CACHE' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java:79:26: warning: Name 'FLATTEN_RESULTS' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java:80:44: warning: Name 'USER_DEFINED_FUNCTIONS' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/QueryJobInfoTest.java:93:31: warning: Name 'QUERY_JOB' must match pattern '^[a-z][a-zA-Z0-9]*_?$'.
src/test/java/com/google/gcloud/bigquery/BigQueryErrorTest.java:5: warning: Wrong order for org.junit.Assert.assertEquals import. Use /google/src/head/depot/google3/tools/java/sort_java_imports.py to automatically sort your imports.
src/main/java/com/google/gcloud/spi/DefaultBigQueryRpc.java:51: warning: Wrong order for com.google.gcloud.spi.BigQueryRpc.Option.MAX_RESULTS import. Use /google/src/head/depot/google3/tools/java/sort_java_imports.py to automatically sort your imports.
src/main/java/com/google/gcloud/spi/DefaultBigQueryRpc.java:106:12: error: 'catch' is not followed by whitespace.
src/main/java/com/google/gcloud/spi/DefaultBigQueryRpc.java:127: error: Line is longer than 100 characters (found 101).
src/main/java/com/google/gcloud/spi/DefaultBigQueryRpc.java:191:12: error: 'catch' is not followed by whitespace.
src/main/java/com/google/gcloud/spi/DefaultBigQueryRpc.java:289:63: error: '?' should be on a new line.
src/main/java/com/google/gcloud/spi/DefaultBigQueryRpc.java:306:12: error: 'catch' is not followed by whitespace.
src/main/java/com/google/gcloud/spi/DefaultBigQueryRpc.java:388:63: error: '?' should be on a new line.
src/main/java/com/google/gcloud/spi/DefaultBigQueryRpc.java:392:12: error: 'catch' is not followed by whitespace.
src/main/java/com/google/gcloud/bigquery/Acl.java:64:3: error: Modifiers out of order specified by style guide (http://go/java-style#s4.8.7-modifiers). Expected order: 'public abstract static'
src/main/java/com/google/gcloud/bigquery/QueryJobInfo.java:59: error: Line is longer than 100 characters (found 101).
src/main/java/com/google/gcloud/bigquery/JobInfo.java:64:3: error: Modifiers out of order specified by style guide (http://go/java-style#s4.8.7-modifiers). Expected order: 'public abstract static'
src/main/java/com/google/gcloud/bigquery/BaseTableInfo.java:168:3: error: Modifiers out of order specified by style guide (http://go/java-style#s4.8.7-modifiers). Expected order: 'public abstract static'
src/main/java/com/google/gcloud/bigquery/UserDefinedFunction.java:16: error: Line is longer than 100 characters (found 101).
src/main/java/com/google/gcloud/bigquery/BigQueryOptions.java:21:8: error: Unused import: com.google.gcloud.spi.DefaultBigQueryRpc. Use /google/src/head/depot/google3/tools/java/remove_unused_imports.py to automatically remove unused imports.
src/main/java/com/google/gcloud/bigquery/BigQueryOptions.java:22: warning: Wrong order for com.google.gcloud.spi.BigQueryRpc import. Use /google/src/head/depot/google3/tools/java/sort_java_imports.py to automatically sort your imports.
src/main/java/com/google/gcloud/bigquery/Schema.java:99:81: error: ':' should be on a new line.
src/main/java/com/google/gcloud/bigquery/Field.java:35: error: Line is longer than 100 characters (found 101).
src/main/java/com/google/gcloud/bigquery/ViewInfo.java:79: error: Line is longer than 100 characters (found 101).
src/main/java/com/google/gcloud/bigquery/ViewInfo.java:90: error: Line is longer than 100 characters (found 101).
Audit done.

This comment was marked as spam.

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants