Skip to content

Commit 007a741

Browse files
committed
Address review comments.
1 parent dc94374 commit 007a741

File tree

12 files changed

+38
-33
lines changed

12 files changed

+38
-33
lines changed

appengine-java21/bigquery/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Google Cloud API Showcase: BigQuery & Cloud Monitoring in App Engine standard environment for Java 21
55

66
This API Showcase demonstrates how to run an App Engine standard environment application with dependencies on both
7-
[Google BigQuery][bigquery] and [StackDriver Monitoring][monitoring].
7+
[Google BigQuery][bigquery] and [Cloud Monitoring][monitoring].
88

99
[bigquery]: https://cloud.google.com/bigquery/docs
1010
[monitoring]: https://cloud.google.com/monitoring/docs

appengine-java21/bigquery/src/main/java/com/example/appengine/bigquerylogging/BigQueryHome.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2018 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,11 +16,12 @@
1616

1717
package com.example.appengine.bigquerylogging;
1818

19-
import com.google.cloud.bigquery.FieldValueList;
20-
import com.google.cloud.bigquery.TableResult;
2119
import java.io.IOException;
2220
import java.util.List;
2321

22+
import com.google.cloud.bigquery.FieldValueList;
23+
import com.google.cloud.bigquery.TableResult;
24+
2425
public class BigQueryHome {
2526
private static BigQueryRunner queryRunner;
2627

appengine-java21/bigquery/src/main/java/com/example/appengine/bigquerylogging/BigQueryRun.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2018 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
1717
package com.example.appengine.bigquerylogging;
1818

1919
import java.io.IOException;
20+
2021
import javax.servlet.annotation.WebServlet;
2122
import javax.servlet.http.HttpServlet;
2223
import javax.servlet.http.HttpServletRequest;

appengine-java21/bigquery/src/main/java/com/example/appengine/bigquerylogging/BigQueryRunner.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2018 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,14 @@
1616

1717
package com.example.appengine.bigquerylogging;
1818

19+
import java.io.IOException;
20+
import java.io.PrintStream;
21+
import java.util.ArrayList;
22+
import java.util.List;
23+
import java.util.Set;
24+
import java.util.UUID;
25+
import java.util.stream.Collectors;
26+
1927
import com.google.api.Metric;
2028
import com.google.api.MetricDescriptor;
2129
import com.google.cloud.ServiceOptions;
@@ -41,13 +49,6 @@
4149
import com.google.monitoring.v3.TimeSeries;
4250
import com.google.monitoring.v3.TypedValue;
4351
import com.google.protobuf.util.Timestamps;
44-
import java.io.IOException;
45-
import java.io.PrintStream;
46-
import java.util.ArrayList;
47-
import java.util.List;
48-
import java.util.Set;
49-
import java.util.UUID;
50-
import java.util.stream.Collectors;
5152

5253
public class BigQueryRunner {
5354
private static final String CUSTOM_METRIC_FILTER =

appengine-java21/bigquery/src/test/java/com/example/appengine/bigquerylogging/BigQueryRunnerTest.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2018 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,34 +16,35 @@
1616

1717
package com.example.appengine.bigquerylogging;
1818

19-
import static com.google.common.truth.Truth.assertThat;
19+
import java.io.ByteArrayOutputStream;
20+
import java.io.PrintStream;
21+
import java.util.Collections;
22+
2023
import static org.junit.Assert.assertEquals;
24+
import org.junit.Before;
25+
import org.junit.Test;
26+
import org.junit.runner.RunWith;
27+
import org.junit.runners.JUnit4;
28+
import org.mockito.ArgumentCaptor;
2129
import static org.mockito.ArgumentMatchers.any;
30+
import org.mockito.Captor;
31+
import org.mockito.Mock;
2232
import static org.mockito.Mockito.times;
2333
import static org.mockito.Mockito.verify;
2434
import static org.mockito.Mockito.when;
35+
import org.mockito.MockitoAnnotations;
2536

2637
import com.google.api.MetricDescriptor;
2738
import com.google.api.gax.rpc.UnaryCallable;
2839
import com.google.cloud.bigquery.BigQueryOptions;
2940
import com.google.cloud.monitoring.v3.MetricServiceClient;
3041
import com.google.cloud.monitoring.v3.MetricServiceClient.ListMetricDescriptorsPagedResponse;
3142
import com.google.cloud.monitoring.v3.stub.MetricServiceStub;
43+
import static com.google.common.truth.Truth.assertThat;
3244
import com.google.monitoring.v3.CreateMetricDescriptorRequest;
3345
import com.google.monitoring.v3.CreateTimeSeriesRequest;
3446
import com.google.monitoring.v3.ListMetricDescriptorsRequest;
3547
import com.google.protobuf.Empty;
36-
import java.io.ByteArrayOutputStream;
37-
import java.io.PrintStream;
38-
import java.util.Collections;
39-
import org.junit.Before;
40-
import org.junit.Test;
41-
import org.junit.runner.RunWith;
42-
import org.junit.runners.JUnit4;
43-
import org.mockito.ArgumentCaptor;
44-
import org.mockito.Captor;
45-
import org.mockito.Mock;
46-
import org.mockito.MockitoAnnotations;
4748

4849
/**
4950
* Tests for simple app sample.

appengine-java21/bigtable/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Moves the Bigtable Hello World application to Google App Engine Standard for Jav
1010
* [Java 21](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
1111
* [Maven](https://maven.apache.org/download.cgi) (at least 3.3.9)
1212
* [Gradle](https://gradle.org)
13-
* [Google Cloud CLI](https://cloud.google.com/sdk/) (aka gcloud)
13+
* [Google Cloud CLI](https://cloud.google.com/cli/) (aka gcloud)
1414

1515
Initialize the Google Cloud CLI using:
1616

appengine-java21/bigtable/src/main/java/com/example/bigtable/BigtableHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Google LLC
2+
* Copyright 2016 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

appengine-java21/bigtable/src/main/webapp/WEB-INF/appengine-web.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright 2024 Google LLC
3+
Copyright 2016 Google LLC
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at

appengine-java21/bigtable/src/main/webapp/bigtable.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<%@ page import="com.example.bigtable.BigtableHelloWorld" %>
44
<!-- [START_EXCLUDE] -->
55
<%--
6-
~ Copyright 2024 Google LLC
6+
~ Copyright 2016 Google LLC
77
~
88
~ Licensed under the Apache License, Version 2.0 (the "License"); you
99
~ may not use this file except in compliance with the License. You may

appengine-java21/datastore-indexes-perfect/src/main/webapp/WEB-INF/appengine-web.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
-->
1717
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
1818
<runtime>java21</runtime>
19+
<!-- enable Appengine APIs.-->
1920
<app-engine-apis>true</app-engine-apis>
2021
<system-properties>
2122
<property name="appengine.use.EE8" value="true"/>

0 commit comments

Comments
 (0)