You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A logical partition that represents a connection to a single Snowflake table, data will be
@@ -66,14 +67,28 @@ public interface SnowflakeStreamingIngestChannel {
66
67
*/
67
68
StringgetFullyQualifiedTableName();
68
69
69
-
/** @return a boolean which indicates whether the channel is valid */
70
+
/**
71
+
* @return a boolean which indicates whether the channel is valid. Typically, this means whether
72
+
* the current instance is the owner of the channel, i.e., if another Client opens a {@link
73
+
* SnowflakeStreamingIngestChannel} of the same name then the current instance will be
74
+
* considered "invalid" as its persisted epoch will have increased. If this returns false then
75
+
* calling `insertRow(s)` on this channel instance will result in an {@link SFException} and
76
+
* no further writes to the channel will be accepted.
77
+
* <p>>Note: there may be a delay between server-side invalidations and the Client detecting
78
+
* it so this may not immediately return false in the event of a server-side invalidation.
79
+
*/
70
80
booleanisValid();
71
81
72
-
/** @return a boolean which indicates whether the channel is closed */
82
+
/**
83
+
* @return a boolean which indicates whether the channel is closed. If true this means that the
84
+
* current {@link SnowflakeStreamingIngestChannel} will not accept any additional rows on
85
+
* calls to `insertRow(s)`
86
+
*/
73
87
booleanisClosed();
74
88
75
89
/**
76
-
* Close the channel, this function will make sure all the data in this channel is committed
90
+
* Close the channel. Closing entails draining any outstanding data in the Channel's buffer and
91
+
* marking the Channel as no longer being able to accept writes via `insertRow(s)`*
77
92
*
78
93
* @return a completable future which will be completed when the channel is closed
79
94
*/
@@ -202,7 +217,7 @@ public interface SnowflakeStreamingIngestChannel {
202
217
* </li>
203
218
*
204
219
* </ul>
205
-
*
220
+
* <p>
206
221
* For TIMESTAMP_LTZ and TIMESTAMP_TZ, all input without timezone will be by default interpreted in the timezone "America/Los_Angeles". This can be changed by calling {@link net.snowflake.ingest.streaming.OpenChannelRequest.OpenChannelRequestBuilder#setDefaultTimezone(ZoneId)}.
207
222
* </td>
208
223
* <tr>
@@ -244,6 +259,9 @@ public interface SnowflakeStreamingIngestChannel {
244
259
* @param offsetToken offset of given row, used for replay in case of failures. It could be null
245
260
* if you don't plan on replaying or can't replay
246
261
* @return insert response that possibly contains errors because of insertion failures
262
+
* @throws SFException if the channel is not considered "valid". Typically, this means that
263
+
* another Client has claimed ownership of the Channel. Writes to this channel will be
264
+
* rejected and result in this exception being thrown.
0 commit comments