Skip to content

Commit eeae71f

Browse files
committed
Rename Bigquery to BigQuery across bigquery module
1 parent 81744f7 commit eeae71f

6 files changed

Lines changed: 54 additions & 55 deletions

File tree

gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/Bigquery.java renamed to gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @see <a href="https://cloud.google.com/bigquery/what-is-bigquery">Google Cloud BigQuery</a>
2525
*/
26-
public interface Bigquery extends Service<BigqueryOptions> {
26+
public interface BigQuery extends Service<BigQueryOptions> {
2727

2828
// TODO(mziccard) add missing methods
2929
}

gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigqueryException.java renamed to gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigQueryException.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,29 @@
2626
* @see <a href="https://cloud.google.com/bigquery/troubleshooting-errors">Google Cloud
2727
* BigQuery error codes</a>
2828
*/
29-
public class BigqueryException extends BaseServiceException {
29+
public class BigQueryException extends BaseServiceException {
3030

3131
private static final long serialVersionUID = -5504832700512784654L;
3232
public static final int UNKNOWN_CODE = -1;
3333

34-
public BigqueryException(int code, String message, boolean retryable) {
34+
public BigQueryException(int code, String message, boolean retryable) {
3535
super(code, message, retryable);
3636
}
3737

3838
/**
39-
* Translate RetryHelperException to the BigqueryException that caused the error. This method will
39+
* Translate RetryHelperException to the BigQueryException that caused the error. This method will
4040
* always throw an exception.
4141
*
42-
* @throws BigqueryException when {@code ex} was caused by a {@code BigqueryException}
42+
* @throws BigQueryException when {@code ex} was caused by a {@code BigQueryException}
4343
* @throws RetryInterruptedException when {@code ex} is a {@code RetryInterruptedException}
4444
*/
45-
static BigqueryException translateAndThrow(RetryHelperException ex) {
46-
if (ex.getCause() instanceof BigqueryException) {
47-
throw (BigqueryException) ex.getCause();
45+
static BigQueryException translateAndThrow(RetryHelperException ex) {
46+
if (ex.getCause() instanceof BigQueryException) {
47+
throw (BigQueryException) ex.getCause();
4848
}
4949
if (ex instanceof RetryInterruptedException) {
5050
RetryInterruptedException.propagate();
5151
}
52-
throw new BigqueryException(UNKNOWN_CODE, ex.getMessage(), false);
52+
throw new BigQueryException(UNKNOWN_CODE, ex.getMessage(), false);
5353
}
5454
}

gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigqueryFactory.java renamed to gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigQueryFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
/**
2323
* An interface for BigQuery factories.
2424
*/
25-
public interface BigqueryFactory extends ServiceFactory<Bigquery, BigqueryOptions> {
25+
public interface BigQueryFactory extends ServiceFactory<BigQuery, BigQueryOptions> {
2626
}

gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigqueryOptions.java renamed to gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigQueryOptions.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,68 +18,68 @@
1818

1919
import com.google.common.collect.ImmutableSet;
2020
import com.google.gcloud.ServiceOptions;
21-
import com.google.gcloud.spi.DefaultBigqueryRpc;
22-
import com.google.gcloud.spi.BigqueryRpc;
23-
import com.google.gcloud.spi.BigqueryRpcFactory;
21+
import com.google.gcloud.spi.DefaultBigQueryRpc;
22+
import com.google.gcloud.spi.BigQueryRpc;
23+
import com.google.gcloud.spi.BigQueryRpcFactory;
2424

2525
import java.util.Set;
2626

27-
public class BigqueryOptions extends ServiceOptions<Bigquery, BigqueryRpc, BigqueryOptions> {
27+
public class BigQueryOptions extends ServiceOptions<BigQuery, BigQueryRpc, BigQueryOptions> {
2828

2929
private static final String BIGQUERY_SCOPE = "https://www.googleapis.com/auth/bigquery";
3030
private static final Set<String> SCOPES = ImmutableSet.of(BIGQUERY_SCOPE);
3131
private static final long serialVersionUID = -215981591481708043L;
3232

33-
public static class DefaultBigqueryFactory implements BigqueryFactory {
33+
public static class DefaultBigqueryFactory implements BigQueryFactory {
3434

35-
private static final BigqueryFactory INSTANCE = new DefaultBigqueryFactory();
35+
private static final BigQueryFactory INSTANCE = new DefaultBigqueryFactory();
3636

3737
@Override
38-
public Bigquery create(BigqueryOptions options) {
38+
public BigQuery create(BigQueryOptions options) {
3939
// TODO(mziccard) return new BigqueryImpl(options);
4040
return null;
4141
}
4242
}
4343

44-
public static class DefaultBigqueryRpcFactory implements BigqueryRpcFactory {
44+
public static class DefaultBigQueryRpcFactory implements BigQueryRpcFactory {
4545

46-
private static final BigqueryRpcFactory INSTANCE = new DefaultBigqueryRpcFactory();
46+
private static final BigQueryRpcFactory INSTANCE = new DefaultBigQueryRpcFactory();
4747

4848
@Override
49-
public BigqueryRpc create(BigqueryOptions options) {
49+
public BigQueryRpc create(BigQueryOptions options) {
5050
// TODO(mziccard) return new DefaultBigqueryRpc(options);
5151
return null;
5252
}
5353
}
5454

5555
public static class Builder extends
56-
ServiceOptions.Builder<Bigquery, BigqueryRpc, BigqueryOptions, Builder> {
56+
ServiceOptions.Builder<BigQuery, BigQueryRpc, BigQueryOptions, Builder> {
5757

5858
private Builder() {
5959
}
6060

61-
private Builder(BigqueryOptions options) {
61+
private Builder(BigQueryOptions options) {
6262
super(options);
6363
}
6464

6565
@Override
66-
public BigqueryOptions build() {
67-
return new BigqueryOptions(this);
66+
public BigQueryOptions build() {
67+
return new BigQueryOptions(this);
6868
}
6969
}
7070

71-
private BigqueryOptions(Builder builder) {
72-
super(BigqueryFactory.class, BigqueryRpcFactory.class, builder);
71+
private BigQueryOptions(Builder builder) {
72+
super(BigQueryFactory.class, BigQueryRpcFactory.class, builder);
7373
}
7474

7575
@Override
76-
protected BigqueryFactory defaultServiceFactory() {
76+
protected BigQueryFactory defaultServiceFactory() {
7777
return DefaultBigqueryFactory.INSTANCE;
7878
}
7979

8080
@Override
81-
protected BigqueryRpcFactory defaultRpcFactory() {
82-
return DefaultBigqueryRpcFactory.INSTANCE;
81+
protected BigQueryRpcFactory defaultRpcFactory() {
82+
return DefaultBigQueryRpcFactory.INSTANCE;
8383
}
8484

8585
@Override
@@ -99,10 +99,10 @@ public int hashCode() {
9999

100100
@Override
101101
public boolean equals(Object obj) {
102-
if (!(obj instanceof BigqueryOptions)) {
102+
if (!(obj instanceof BigQueryOptions)) {
103103
return false;
104104
}
105-
BigqueryOptions other = (BigqueryOptions) obj;
105+
BigQueryOptions other = (BigQueryOptions) obj;
106106
return baseEquals(other);
107107
}
108108

gcloud-java-bigquery/src/main/java/com/google/gcloud/spi/BigqueryRpc.java renamed to gcloud-java-bigquery/src/main/java/com/google/gcloud/spi/BigQueryRpc.java

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package com.google.gcloud.spi;
1818

1919
import com.google.api.services.bigquery.model.Dataset;
20-
import com.google.api.services.bigquery.model.DatasetReference;
2120
import com.google.api.services.bigquery.model.GetQueryResultsResponse;
2221
import com.google.api.services.bigquery.model.Job;
2322
import com.google.api.services.bigquery.model.JobReference;
@@ -28,11 +27,11 @@
2827
import com.google.api.services.bigquery.model.TableDataInsertAllResponse;
2928
import com.google.api.services.bigquery.model.TableReference;
3029
import com.google.api.services.bigquery.model.TableRow;
31-
import com.google.gcloud.bigquery.BigqueryException;
30+
import com.google.gcloud.bigquery.BigQueryException;
3231

3332
import java.util.Map;
3433

35-
public interface BigqueryRpc {
34+
public interface BigQueryRpc {
3635

3736
// These options are part of the Google Cloud BigQuery query parameters
3837
enum Option {
@@ -46,7 +45,7 @@ enum Option {
4645
PAGE_TOKEN("pageToken"),
4746
START_INDEX("startIndex"),
4847
STATE_FILTER("stateFilter"),
49-
TIMEOUT("timeOut");
48+
TIMEOUT("timeoutMs");
5049

5150
private final String value;
5251

@@ -99,44 +98,44 @@ public Y y() {
9998
}
10099
}
101100

102-
Dataset getDataset(String datasetId, Map<Option, ?> options) throws BigqueryException;
101+
Dataset getDataset(String datasetId, Map<Option, ?> options) throws BigQueryException;
103102

104-
Tuple<String, Iterable<Dataset>> listDatasets(Map<Option, ?> options) throws BigqueryException;
103+
Tuple<String, Iterable<Dataset>> listDatasets(Map<Option, ?> options) throws BigQueryException;
105104

106-
Dataset create(Dataset dataset, Map<Option, ?> options) throws BigqueryException;
105+
Dataset create(Dataset dataset, Map<Option, ?> options) throws BigQueryException;
107106

108-
boolean deleteDataset(String datasetId, Map<Option, ?> options) throws BigqueryException;
107+
boolean deleteDataset(String datasetId, Map<Option, ?> options) throws BigQueryException;
109108

110-
Dataset patch(Dataset dataset, Map<Option, ?> options) throws BigqueryException;
109+
Dataset patch(Dataset dataset, Map<Option, ?> options) throws BigQueryException;
111110

112-
Table getTable(String datasetId, String tableId, Map<Option, ?> options) throws BigqueryException;
111+
Table getTable(String datasetId, String tableId, Map<Option, ?> options) throws BigQueryException;
113112

114113
Tuple<String, Iterable<Table>> listTables(String dataset, Map<Option, ?> options)
115-
throws BigqueryException;
114+
throws BigQueryException;
116115

117-
Table create(String dataset, Table table, Map<Option, ?> options) throws BigqueryException;
116+
Table create(Table table, Map<Option, ?> options) throws BigQueryException;
118117

119118
boolean deleteTable(String datasetId, String tableId, Map<Option, ?> options)
120-
throws BigqueryException;
119+
throws BigQueryException;
121120

122-
Table patch(Table table, Map<Option, ?> options) throws BigqueryException;
121+
Table patch(Table table, Map<Option, ?> options) throws BigQueryException;
123122

124123
TableDataInsertAllResponse insertAll(TableReference table, TableDataInsertAllRequest request,
125-
Map<Option, ?> options) throws BigqueryException;
124+
Map<Option, ?> options) throws BigQueryException;
126125

127126
Tuple<String, Iterable<TableRow>> listTableData(String datasetId, String tableId,
128-
Map<Option, ?> options) throws BigqueryException;
127+
Map<Option, ?> options) throws BigQueryException;
129128

130-
Job getJob(String jobId, Map<Option, ?> options) throws BigqueryException;
129+
Job getJob(String jobId, Map<Option, ?> options) throws BigQueryException;
131130

132-
Tuple<String, Iterable<Job>> listJobs(Map<Option, ?> options) throws BigqueryException;
131+
Tuple<String, Iterable<Job>> listJobs(Map<Option, ?> options) throws BigQueryException;
133132

134-
Job create(Job job, Map<Option, ?> options) throws BigqueryException;
133+
Job create(Job job, Map<Option, ?> options) throws BigQueryException;
135134

136-
boolean cancel(String jobId, Map<Option, ?> options) throws BigqueryException;
135+
boolean cancel(String jobId, Map<Option, ?> options) throws BigQueryException;
137136

138137
GetQueryResultsResponse getQueryResults(JobReference job, Map<Option, ?> options)
139-
throws BigqueryException;
138+
throws BigQueryException;
140139

141-
QueryResponse query(QueryRequest request, Map<Option, ?> options) throws BigqueryException;
140+
QueryResponse query(QueryRequest request, Map<Option, ?> options) throws BigQueryException;
142141
}

gcloud-java-bigquery/src/main/java/com/google/gcloud/spi/BigqueryRpcFactory.java renamed to gcloud-java-bigquery/src/main/java/com/google/gcloud/spi/BigQueryRpcFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
package com.google.gcloud.spi;
1818

19-
import com.google.gcloud.bigquery.BigqueryOptions;
19+
import com.google.gcloud.bigquery.BigQueryOptions;
2020

2121
/**
2222
* An interface for BigQuery RPC factory.
2323
* Implementation will be loaded via {@link java.util.ServiceLoader}.
2424
*/
25-
public interface BigqueryRpcFactory extends ServiceRpcFactory<BigqueryRpc, BigqueryOptions> {
25+
public interface BigQueryRpcFactory extends ServiceRpcFactory<BigQueryRpc, BigQueryOptions> {
2626
}

0 commit comments

Comments
 (0)