Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit 3bc7aca

Browse files
fix: Add documentation to Exceptions (#1745)
* fix: Add documentation to Exceptions * . * . * . * 🦉 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 f842d51 commit 3bc7aca

3 files changed

Lines changed: 36 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ If you are using Maven without BOM, add this to your dependencies:
4949
If you are using Gradle 5.x or later, add this to your dependencies:
5050

5151
```Groovy
52-
implementation platform('com.google.cloud:libraries-bom:26.0.0')
52+
implementation platform('com.google.cloud:libraries-bom:26.1.0')
5353
5454
implementation 'com.google.cloud:google-cloud-bigquerystorage'
5555
```

google-cloud-bigquerystorage/clirr-ignored-differences.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,13 @@
1515
<differenceType>8001</differenceType>
1616
<className>com/google/cloud/bigquery/storage/v1/Exceptions$WriterClosedException</className>
1717
</difference>
18+
<difference>
19+
<differenceType>5001</differenceType>
20+
<className>com/google/cloud/bigquery/storage/v1/Exceptions$StreamWriterClosedException</className>
21+
</difference>
22+
<difference>
23+
<differenceType>7004</differenceType>
24+
<className>com/google/cloud/bigquery/storage/v1/Exceptions$StreamWriterClosedException</className>
25+
<method>protected Exceptions$StreamWriterClosedException(io.grpc.Status, java.lang.String, java.lang.String)</method>
26+
</difference>
1827
</differences>

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

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,22 @@ public long getActualOffset() {
7171
}
7272
}
7373

74-
/** Stream has already been finalized. */
74+
/**
75+
* The write stream has already been finalized and will not accept further appends or flushes. To
76+
* send additional requests, you will need to create a new write stream via CreateWriteStream.
77+
*/
7578
public static final class StreamFinalizedException extends StorageException {
7679
protected StreamFinalizedException(Status grpcStatus, String name) {
7780
super(grpcStatus, name, null, null, ImmutableMap.of());
7881
}
7982
}
8083

84+
/**
85+
* This writer instance has either been closed by the user explicitly, or has encountered
86+
* non-retriable errors.
87+
*
88+
* <p>To continue to write to the same stream, you will need to create a new writer instance.
89+
*/
8190
public static final class StreamWriterClosedException extends StorageException {
8291
protected StreamWriterClosedException(Status grpcStatus, String name) {
8392
super(grpcStatus, name, null, null, ImmutableMap.of());
@@ -94,23 +103,36 @@ protected SchemaMismatchedException(Status grpcStatus, String name) {
94103
}
95104
}
96105

97-
/** Offset already exists. */
106+
/**
107+
* Offset already exists. This indicates that the append request attempted to write data to an
108+
* offset before the current end of the stream. This is an expected exception when ExactOnce is
109+
* enforced. You can safely ignore it, and keep appending until there is new data to append.
110+
*/
98111
public static final class OffsetAlreadyExists extends StorageException {
99112
protected OffsetAlreadyExists(
100113
Status grpcStatus, String name, Long expectedOffset, Long actualOffset) {
101114
super(grpcStatus, name, expectedOffset, actualOffset, ImmutableMap.of());
102115
}
103116
}
104117

105-
/** Offset out of range. */
118+
/**
119+
* Offset out of range. This indicates that the append request is attempting to write data to a
120+
* point beyond the current end of the stream. To append data successfully, you must either
121+
* specify the offset corresponding to the current end of stream, or omit the offset from the
122+
* append request. It usually means a bug in your code that introduces a gap in appends.
123+
*/
106124
public static final class OffsetOutOfRange extends StorageException {
107125
protected OffsetOutOfRange(
108126
Status grpcStatus, String name, Long expectedOffset, Long actualOffset) {
109127
super(grpcStatus, name, expectedOffset, actualOffset, ImmutableMap.of());
110128
}
111129
}
112130

113-
/** Stream is not found. */
131+
/**
132+
* The stream is not found. Possible causes include incorrectly specifying the stream identifier
133+
* or attempting to use an old stream identifier that no longer exists. You can invoke
134+
* CreateWriteStream to create a new stream.
135+
*/
114136
public static final class StreamNotFound extends StorageException {
115137
protected StreamNotFound(Status grpcStatus, String name) {
116138
super(grpcStatus, name, null, null, ImmutableMap.of());

0 commit comments

Comments
 (0)