Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit c7e5ef6

Browse files
ci: javadoc job (JDK 17) in ci.yaml (#2173)
* ci: javadoc job (JDK 17) in ci.yaml This also changes the JDK distribution from zulu to temurin https://github.com/actions/setup-java#eclipse-temurin * fix javadoc * javadoc fix * lint fix * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 1b94f97 commit c7e5ef6

17 files changed

Lines changed: 98 additions & 38 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v3
1818
- uses: actions/setup-java@v2
1919
with:
20-
distribution: zulu
20+
distribution: temurin
2121
java-version: ${{matrix.java}}
2222
- run: java -version
2323
- run: .kokoro/build.sh
@@ -51,7 +51,7 @@ jobs:
5151
- uses: actions/checkout@v3
5252
- uses: actions/setup-java@v2
5353
with:
54-
distribution: zulu
54+
distribution: temurin
5555
java-version: 8
5656
- run: java -version
5757
- run: .kokoro/build.bat
@@ -66,17 +66,29 @@ jobs:
6666
- uses: actions/checkout@v3
6767
- uses: actions/setup-java@v2
6868
with:
69-
distribution: zulu
69+
distribution: temurin
7070
java-version: ${{matrix.java}}
7171
- run: java -version
7272
- run: .kokoro/dependencies.sh
73+
javadoc:
74+
runs-on: ubuntu-latest
75+
steps:
76+
- uses: actions/checkout@v3
77+
- uses: actions/setup-java@v3
78+
with:
79+
distribution: temurin
80+
java-version: 17
81+
- run: java -version
82+
- run: .kokoro/build.sh
83+
env:
84+
JOB_TYPE: javadoc
7385
lint:
7486
runs-on: ubuntu-latest
7587
steps:
7688
- uses: actions/checkout@v3
7789
- uses: actions/setup-java@v2
7890
with:
79-
distribution: zulu
91+
distribution: temurin
8092
java-version: 11
8193
- run: java -version
8294
- run: .kokoro/build.sh
@@ -88,7 +100,7 @@ jobs:
88100
- uses: actions/checkout@v3
89101
- uses: actions/setup-java@v2
90102
with:
91-
distribution: zulu
103+
distribution: temurin
92104
java-version: 8
93105
- run: java -version
94106
- run: .kokoro/build.sh

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/CivilTimeEncoder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
* <p>The valid range and number of bits required by each date/time field is as the following:
3131
*
3232
* <table>
33+
* <caption>Range and bits for date/time fields</caption>
3334
* <tr> <th> Field </th> <th> Range </th> <th> #Bits </th> </tr>
3435
* <tr> <td> Year </td> <td> [1, 9999] </td> <td> 14 </td> </tr>
3536
* <tr> <td> Month </td> <td> [1, 12] </td> <td> 4 </td> </tr>

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,8 @@ private void requestCallback(AppendRowsResponse response) {
843843

844844
log.fine(
845845
String.format(
846-
"Got response with schema updated (omitting updated schema in response here): %s writer id %s",
846+
"Got response with schema updated (omitting updated schema in response here): %s"
847+
+ " writer id %s",
847848
responseWithUpdatedSchemaRemoved.toString(), writerId));
848849
}
849850

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/Exceptions.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ public String getStreamName() {
243243
}
244244

245245
/**
246-
* This exception is thrown from {@link SchemaAwareStreamWriter#append()} when the client side
247-
* Proto serialization fails. It can also be thrown by the server in case rows contains invalid
248-
* data. The exception contains a Map of indexes of faulty rows and the corresponding error
249-
* message.
246+
* This exception is thrown from {@link SchemaAwareStreamWriter#append(Iterable)} when the client
247+
* side Proto serialization fails. It can also be thrown by the server in case rows contains
248+
* invalid data. The exception contains a Map of indexes of faulty rows and the corresponding
249+
* error message.
250250
*/
251251
public static class AppendSerializationError extends AppendSerializtionError {
252252

@@ -344,7 +344,8 @@ protected InflightRequestsLimitExceededException(String writerId, long currentLi
344344
super(
345345
Status.fromCode(Status.Code.RESOURCE_EXHAUSTED)
346346
.withDescription(
347-
"Exceeds client side inflight buffer, consider add more buffer or open more connections. Current limit: "
347+
"Exceeds client side inflight buffer, consider add more buffer or open more"
348+
+ " connections. Current limit: "
348349
+ currentLimit),
349350
writerId,
350351
currentLimit);
@@ -356,7 +357,8 @@ protected InflightBytesLimitExceededException(String writerId, long currentLimit
356357
super(
357358
Status.fromCode(Status.Code.RESOURCE_EXHAUSTED)
358359
.withDescription(
359-
"Exceeds client side inflight buffer, consider add more buffer or open more connections. Current limit: "
360+
"Exceeds client side inflight buffer, consider add more buffer or open more"
361+
+ " connections. Current limit: "
360362
+ currentLimit),
361363
writerId,
362364
currentLimit);

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ private JsonStreamWriter(SchemaAwareStreamWriter.Builder<Object> builder)
5454
* is created with the updated TableSchema.
5555
*
5656
* @param jsonArr The JSON array that contains JSONObjects to be written
57-
* @return ApiFuture<AppendRowsResponse> returns an AppendRowsResponse message wrapped in an
58-
* ApiFuture
57+
* @return {@code ApiFuture<AppendRowsResponse>} returns an AppendRowsResponse message wrapped in
58+
* an ApiFuture
5959
*/
6060
public ApiFuture<AppendRowsResponse> append(JSONArray jsonArr)
6161
throws IOException, Descriptors.DescriptorValidationException {
@@ -70,8 +70,8 @@ public ApiFuture<AppendRowsResponse> append(JSONArray jsonArr)
7070
*
7171
* @param jsonArr The JSON array that contains JSONObjects to be written
7272
* @param offset Offset for deduplication
73-
* @return ApiFuture<AppendRowsResponse> returns an AppendRowsResponse message wrapped in an
74-
* ApiFuture
73+
* @return {@code ApiFuture<AppendRowsResponse>} returns an AppendRowsResponse message wrapped in
74+
* an ApiFuture
7575
*/
7676
public ApiFuture<AppendRowsResponse> append(JSONArray jsonArr, long offset)
7777
throws IOException, Descriptors.DescriptorValidationException {

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/SchemaAwareStreamWriter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ private SchemaAwareStreamWriter(Builder<T> builder)
101101
* created with the updated TableSchema.
102102
*
103103
* @param items The array that contains objects to be written
104-
* @return ApiFuture<AppendRowsResponse> returns an AppendRowsResponse message wrapped in an
105-
* ApiFuture
104+
* @return {@code ApiFuture<AppendRowsResponse>} returns an AppendRowsResponse message wrapped in
105+
* an ApiFuture
106106
*/
107107
public ApiFuture<AppendRowsResponse> append(Iterable<T> items)
108108
throws IOException, DescriptorValidationException {
@@ -158,8 +158,8 @@ private Message buildMessage(T item)
158158
*
159159
* @param items The collection that contains objects to be written
160160
* @param offset Offset for deduplication
161-
* @return ApiFuture<AppendRowsResponse> returns an AppendRowsResponse message wrapped in an
162-
* ApiFuture
161+
* @return {@code ApiFuture<AppendRowsResponse>} returns an AppendRowsResponse message wrapped in
162+
* an ApiFuture
163163
*/
164164
public ApiFuture<AppendRowsResponse> append(Iterable<T> items, long offset)
165165
throws IOException, DescriptorValidationException {

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ private StreamWriter(Builder builder) throws IOException {
247247
String fetchedLocation = writeStream.getLocation();
248248
log.info(
249249
String.format(
250-
"Fethed location %s for stream name %s, extracted project and dataset name: %s\"",
250+
"Fethed location %s for stream name %s, extracted project and dataset"
251+
+ " name: %s\"",
251252
fetchedLocation, streamName, datasetAndProjectName));
252253
return fetchedLocation;
253254
});
@@ -494,12 +495,12 @@ public void close() {
494495
singleConnectionOrConnectionPool.close(this);
495496
}
496497

497-
/** Constructs a new {@link StreamWriterV2.Builder} using the given stream and client. */
498+
/** Constructs a new {@link StreamWriter.Builder} using the given stream and client. */
498499
public static StreamWriter.Builder newBuilder(String streamName, BigQueryWriteClient client) {
499500
return new StreamWriter.Builder(streamName, client);
500501
}
501502

502-
/** Constructs a new {@link StreamWriterV2.Builder} using the given stream. */
503+
/** Constructs a new {@link StreamWriter.Builder} using the given stream. */
503504
public static StreamWriter.Builder newBuilder(String streamName) {
504505
return new StreamWriter.Builder(streamName);
505506
}

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/CivilTimeEncoder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
* <p>The valid range and number of bits required by each date/time field is as the following:
3131
*
3232
* <table>
33+
* <caption>Range and bits for date/time fields</caption>
3334
* <tr> <th> Field </th> <th> Range </th> <th> #Bits </th> </tr>
3435
* <tr> <td> Year </td> <td> [1, 9999] </td> <td> 14 </td> </tr>
3536
* <tr> <td> Month </td> <td> [1, 12] </td> <td> 4 </td> </tr>

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ private JsonStreamWriter(Builder builder)
8383
* data to protobuf messages, then using StreamWriter's append() to write the data.
8484
*
8585
* @param jsonArr The JSON array that contains JSONObjects to be written
86-
* @return ApiFuture<AppendRowsResponse> returns an AppendRowsResponse message wrapped in an
87-
* ApiFuture
86+
* @return {@code ApiFuture<AppendRowsResponse>} returns an AppendRowsResponse message wrapped in
87+
* an ApiFuture
8888
*/
8989
public ApiFuture<AppendRowsResponse> append(JSONArray jsonArr) {
9090
return append(jsonArr, -1);
@@ -96,8 +96,8 @@ public ApiFuture<AppendRowsResponse> append(JSONArray jsonArr) {
9696
*
9797
* @param jsonArr The JSON array that contains JSONObjects to be written
9898
* @param offset Offset for deduplication
99-
* @return ApiFuture<AppendRowsResponse> returns an AppendRowsResponse message wrapped in an
100-
* ApiFuture
99+
* @return {@code ApiFuture<AppendRowsResponse>} returns an AppendRowsResponse message wrapped in
100+
* an ApiFuture
101101
*/
102102
public ApiFuture<AppendRowsResponse> append(JSONArray jsonArr, long offset) {
103103
ProtoRows.Builder rowsBuilder = ProtoRows.newBuilder();

google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1/JsonStreamWriterTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,8 @@ public void run() throws Throwable {
12801280
ex.getStatus()
12811281
.getDescription()
12821282
.contains(
1283-
"Exceeds client side inflight buffer, consider add more buffer or open more connections"));
1283+
"Exceeds client side inflight buffer, consider add more buffer or open more"
1284+
+ " connections"));
12841285
}
12851286
}
12861287

@@ -1342,7 +1343,8 @@ public void testMultipleAppendSerializationErrors()
13421343
"The source object has fields unknown to BigQuery: root.not_foo.",
13431344
rowIndexToErrorMessage.get(0));
13441345
assertEquals(
1345-
"Field root.foo failed to convert to STRING. Error: JSONObject does not have a string field at root.foo.",
1346+
"Field root.foo failed to convert to STRING. Error: JSONObject does not have a string"
1347+
+ " field at root.foo.",
13461348
rowIndexToErrorMessage.get(2));
13471349
}
13481350
}

0 commit comments

Comments
 (0)