GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Updated bigquery, cloud-tasks, and compute folders. (#985) · llatif/java-docs-samples@adea168

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • bigquery
    • cloud-client
      • README.md
      • pom.xml
      • src
        • main/java/com/example/bigquery
          • AuthSnippets.java
          • QueryParametersSample.java
          • QuerySample.java
          • QuickstartSample.java
          • SimpleApp.java
        • test/java/com/example/bigquery
          • AuthSnippetsIT.java
          • QueryParametersSampleIT.java
          • QuerySampleIT.java
          • QuickstartSampleIT.java
          • SimpleAppIT.java
    • datatransfer/cloud-client
      • README.md
      • pom.xml
      • src
        • main/java/com/example/bigquerydatatransfer
          • QuickstartSample.java
        • test/java/com/example/bigquerydatatransfer
          • QuickstartSampleIT.java
    • rest
      • README.md
      • pom.xml
      • src
        • main/java/com/example/bigquery
          • LabelsSample.java
        • test/java/com/example/bigquery
          • Constants.java
          • LabelsSampleIT.java
  • cloud-tasks
    • README.md
    • pom.xml
    • src
      • main/java/com.example.cloudtasks
        • PullQueue.java
      • test/java/com/example/cloudtasks
        • PullQueueIT.java
  • compute
    • cmdline
      • README.md
      • pom.xml
    • error-reporting
      • README.md
      • pom.xml
      • src/main/java/com/example/compute/errorreporting
        • ExceptionUtil.java
    • mailjet
      • README.md
      • pom.xml
      • src
        • main/java/com/example/compute/mailjet
          • MailjetSender.java
        • test/java/com/example/compute/mailjet
          • MailjetSenderTest.java
    • sendgrid
      • README.md
      • pom.xml
      • src/main/java/com/example/compute/sendgrid
        • SendEmailServlet.java
    • signed-metadata
      • README.md
      • pom.xml
      • src/main/java/com/example/compute/signedmetadata
        • App.java
        • GCPInstance.java
        • VerifyingInstance.java
        • token
          • DecodedGoogleJWTWrapper.java
          • Downloader.java
          • GoogleRSAKeyProvider.java
          • TokenDownloader.java
          • TokenVerifier.java
  • pom.xml

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bigquery/cloud-client/README.md‎

Copy file name to clipboardExpand all lines: bigquery/cloud-client/README.md
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Getting Started with BigQuery and the Google Java API Client library
22

3+
<a href="https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/java-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/README.md">
4+
<img alt="Open in Cloud Shell" src ="http://gstatic.com/cloudssh/images/open-btn.png"></a>
5+
36
[Google's BigQuery Service][BigQuery] features a REST-based API that allows
47
developers to create applications to run ad-hoc queries on massive datasets.
58
These sample Java applications demonstrate how to access the BigQuery API using
Collapse file

‎bigquery/cloud-client/pom.xml‎

Copy file name to clipboardExpand all lines: bigquery/cloud-client/pom.xml
+7-5Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919
<artifactId>bigquery-google-cloud-samples</artifactId>
2020
<packaging>jar</packaging>
2121

22-
<!-- Parent defines config for testing & linting. -->
22+
<!--
23+
The parent pom defines common style checks and testing strategies for our samples.
24+
Removing or replacing it should not affect the execution of the samples in anyway.
25+
-->
2326
<parent>
24-
<artifactId>doc-samples</artifactId>
25-
<groupId>com.google.cloud</groupId>
26-
<version>1.0.0</version>
27-
<relativePath>../..</relativePath>
27+
<groupId>com.google.cloud.samples</groupId>
28+
<artifactId>shared-configuration</artifactId>
29+
<version>1.0.8</version>
2830
</parent>
2931

3032
<properties>
Collapse file

‎bigquery/cloud-client/src/main/java/com/example/bigquery/AuthSnippets.java‎

Copy file name to clipboardExpand all lines: bigquery/cloud-client/src/main/java/com/example/bigquery/AuthSnippets.java
+14-15Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
2-
Copyright 2017, Google, Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2017 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.bigquery;
1818

@@ -21,7 +21,6 @@
2121
import com.google.cloud.bigquery.BigQuery;
2222
import com.google.cloud.bigquery.BigQueryOptions;
2323
import com.google.cloud.bigquery.Dataset;
24-
2524
import java.io.File;
2625
import java.io.FileInputStream;
2726
import java.io.IOException;
Collapse file

‎bigquery/cloud-client/src/main/java/com/example/bigquery/QueryParametersSample.java‎

Copy file name to clipboardExpand all lines: bigquery/cloud-client/src/main/java/com/example/bigquery/QueryParametersSample.java
+18-19Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11
/*
2-
Copyright 2016 Google Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2016 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.bigquery;
1818

1919
import com.google.cloud.bigquery.BigQuery;
2020
import com.google.cloud.bigquery.BigQueryOptions;
2121
import com.google.cloud.bigquery.FieldValue;
22-
import com.google.cloud.bigquery.QueryParameterValue;
2322
import com.google.cloud.bigquery.QueryJobConfiguration;
23+
import com.google.cloud.bigquery.QueryParameterValue;
2424
import com.google.cloud.bigquery.QueryResponse;
2525
import com.google.cloud.bigquery.QueryResult;
26+
import java.io.IOException;
27+
import java.util.Arrays;
28+
import java.util.List;
2629
import org.joda.time.DateTime;
2730
import org.joda.time.DateTimeZone;
2831
import org.joda.time.format.DateTimeFormatter;
2932
import org.joda.time.format.ISODateTimeFormat;
3033

31-
import java.io.IOException;
32-
import java.util.Arrays;
33-
import java.util.List;
34-
3534
/** A sample that demonstrates use of query parameters. */
3635
public class QueryParametersSample {
3736
private static final int ERROR_CODE = 1;
Collapse file

‎bigquery/cloud-client/src/main/java/com/example/bigquery/QuerySample.java‎

Copy file name to clipboardExpand all lines: bigquery/cloud-client/src/main/java/com/example/bigquery/QuerySample.java
+20-20Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
2-
Copyright 2016, Google, Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2016 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.bigquery;
1818

@@ -26,6 +26,10 @@
2626
import com.google.cloud.bigquery.QueryResponse;
2727
import com.google.cloud.bigquery.QueryResult;
2828
import com.google.cloud.bigquery.TableId;
29+
import java.io.IOException;
30+
import java.util.List;
31+
import java.util.UUID;
32+
import java.util.concurrent.TimeoutException;
2933
import org.apache.commons.cli.CommandLine;
3034
import org.apache.commons.cli.CommandLineParser;
3135
import org.apache.commons.cli.DefaultParser;
@@ -34,11 +38,6 @@
3438
import org.apache.commons.cli.Options;
3539
import org.apache.commons.cli.ParseException;
3640

37-
import java.io.IOException;
38-
import java.util.List;
39-
import java.util.UUID;
40-
import java.util.concurrent.TimeoutException;
41-
4241
/** Runs a query against BigQuery. */
4342
public class QuerySample {
4443
// [START query_config_simple]
@@ -158,8 +157,9 @@ public static void runQuery(QueryJobConfiguration queryConfig)
158157
/** Prompts the user for the required parameters to perform a query. */
159158
public static void main(final String[] args)
160159
throws IOException, InterruptedException, TimeoutException, ParseException {
160+
//CHECKSTYLE OFF: VariableDeclarationUsageDistance - improves readability
161161
Options options = new Options();
162-
162+
//CHECKSTLYE ON: VariableDeclarationUsageDistance
163163
// Use an OptionsGroup to choose which sample to run.
164164
OptionGroup samples = new OptionGroup();
165165
samples.addOption(Option.builder().longOpt("runSimpleQuery").build());
Collapse file

‎bigquery/cloud-client/src/main/java/com/example/bigquery/QuickstartSample.java‎

Copy file name to clipboardExpand all lines: bigquery/cloud-client/src/main/java/com/example/bigquery/QuickstartSample.java
+14-14Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
2-
Copyright 2016, Google, Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2016 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.bigquery;
1818

Collapse file

‎bigquery/cloud-client/src/main/java/com/example/bigquery/SimpleApp.java‎

Copy file name to clipboardExpand all lines: bigquery/cloud-client/src/main/java/com/example/bigquery/SimpleApp.java
+15-16Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
11
/*
2-
Copyright 2016, Google, Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2016 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.bigquery;
1818

1919
// [START bigquery_simple_app_all]
2020
// [START bigquery_simple_app_deps]
21+
2122
import com.google.cloud.bigquery.BigQuery;
2223
import com.google.cloud.bigquery.BigQueryOptions;
23-
import com.google.cloud.bigquery.FieldValue;
2424
import com.google.cloud.bigquery.FieldValueList;
2525
import com.google.cloud.bigquery.Job;
2626
import com.google.cloud.bigquery.JobId;
2727
import com.google.cloud.bigquery.JobInfo;
2828
import com.google.cloud.bigquery.QueryJobConfiguration;
2929
import com.google.cloud.bigquery.QueryResponse;
3030
import com.google.cloud.bigquery.QueryResult;
31-
import java.util.List;
3231
import java.util.UUID;
3332
// [END bigquery_simple_app_deps]
3433

Collapse file

‎bigquery/cloud-client/src/test/java/com/example/bigquery/AuthSnippetsIT.java‎

Copy file name to clipboardExpand all lines: bigquery/cloud-client/src/test/java/com/example/bigquery/AuthSnippetsIT.java
+16-17Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
/*
2-
Copyright 2017, Google, Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2017 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.bigquery;
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020

21+
import java.io.ByteArrayOutputStream;
22+
import java.io.PrintStream;
2123
import org.junit.After;
2224
import org.junit.Before;
2325
import org.junit.Test;
2426
import org.junit.runner.RunWith;
2527
import org.junit.runners.JUnit4;
2628

27-
import java.io.ByteArrayOutputStream;
28-
import java.io.PrintStream;
29-
3029
/** Tests for auth samples. */
3130
@RunWith(JUnit4.class)
3231
@SuppressWarnings("checkstyle:abbreviationaswordinname")
Collapse file

‎bigquery/cloud-client/src/test/java/com/example/bigquery/QueryParametersSampleIT.java‎

Copy file name to clipboardExpand all lines: bigquery/cloud-client/src/test/java/com/example/bigquery/QueryParametersSampleIT.java
+16-17Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
/*
2-
Copyright 2016 Google Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2016 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.bigquery;
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020

21+
import java.io.ByteArrayOutputStream;
22+
import java.io.PrintStream;
2123
import org.junit.After;
2224
import org.junit.Before;
2325
import org.junit.Test;
2426
import org.junit.runner.RunWith;
2527
import org.junit.runners.JUnit4;
2628

27-
import java.io.ByteArrayOutputStream;
28-
import java.io.PrintStream;
29-
3029
/** Tests for simple app sample. */
3130
@RunWith(JUnit4.class)
3231
@SuppressWarnings("checkstyle:abbreviationaswordinname")

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.