Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@snow SNOW-837436 Streaming ingest: dedup var for support status code messages #526

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,37 +30,21 @@ public enum StreamingIngestResponseCode {
ERR_GENERAL_EXCEPTION_RETRY_REQUEST(
10, "Snowflake experienced a transient exception, please retry the request"),
ERR_MALFORMED_REQUEST_MISSING_BLOBS_IN_REQUEST(
11,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
11, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MISSING_CHUNKS_FOR_BLOB_IN_REQUEST(
12,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
12, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MISSING_CHANNELS_FOR_CHUNK_FOR_BLOB_IN_REQUEST(
13,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
13, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MISSING_BLOB_PATH(
14,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
14, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MISSING_DATABASE_IN_REQUEST(
15,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
15, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MISSING_SCHEMA_IN_REQUEST(
16,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
16, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MISSING_TABLE_IN_REQUEST(
17,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
17, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MISSING_CHANNEL_NAME_IN_REQUEST(
18,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
18, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_CHANNEL_NO_LONGER_EXISTS(
19,
"The requested channel no longer exists, most likely due to inactivity. Please re-open the"
Expand All @@ -76,60 +60,36 @@ public enum StreamingIngestResponseCode {
"Another channel managed by this Client had an issue which is preventing the current channel"
+ " from ingesting data. Please re-open the channel"),
ERR_MALFORMED_REQUEST_DUPLICATE_CHANNEL_IN_CHUNK(
23,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
23, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MISSING_CLIENT_SEQUENCER_IN_REQUEST(
24,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
24, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_CHANNEL_DOES_NOT_EXIST_OR_IS_NOT_AUTHORIZED(
25, "The channel does not exist or is not authorized"),
ROW_SEQUENCER_IS_COMMITTED(26, "The requested row sequencer is committed"),
ROW_SEQUENCER_IS_NOT_COMMITTED(27, "The requested row sequencer is not committed"),

ERR_MALFORMED_REQUEST_MISSING_CHUNK_MD5_IN_REQUEST(
28,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
28, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MISSING_EP_INFO_IN_REQUEST(
29,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
29, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_INVALID_CHUNK_LENGTH(
30,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
30, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_INVALID_ROW_COUNT_IN_EP_INFO(
31,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
31, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_INVALID_COLUMN_IN_EP_INFO(
32,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
32, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_INVALID_EP_INFO_GENERIC(
33,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
33, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_INVALID_BLOB_NAME(
34,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
34, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),

ERR_CHANNEL_MUST_BE_REOPENED(36, "The channel must be reopened"),
ERR_MALFORMED_REQUEST_MISSING_ROLE_IN_REQUEST(
37,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
37, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_BLOB_HAS_WRONG_FORMAT_OR_EXTENSION(
38,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
38, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_BLOB_MISSING_MD5(
39,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
39, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MISSING_COLUMN_IN_EP_INFO(
40,
"A schema change occurred on the table, please re-open the channel and supply the missing"
Expand All @@ -139,13 +99,9 @@ public enum StreamingIngestResponseCode {
ERR_OUTDATED_CLIENT_SDK_VERSION(
43, "Outdated Client SDK. Please update your SDK to the latest version"),
ERR_MALFORMED_REQUEST_UNDEFINED_USER_AGENT_HEADER(
44,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
44, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_MALFORMED_REQUEST_MALFORMED_USER_AGENT_HEADER(
45,
"The SDK generated a malformed request. Please contact Snowflake support for further"
+ " assistance"),
45, StreamingIngestResponseCode.MALFORMED_REQUEST_STATUS_MESSAGE),
ERR_INTERLEAVING_NOT_SUPPORTED_AT_THIS_TIME(
46, "Interleaving among tables is not supported at this time"),
ERR_RESOLVED_TABLE_IS_READ_ONLY(47, "Table is read-only"),
Expand All @@ -155,7 +111,12 @@ public enum StreamingIngestResponseCode {
49,
"Ingestion into this table is not allowed at this time, please contact Snowflake support");

public static final String UNKNOWN_STATUS_MESSAGE = "unknown";
public static final String UNKNOWN_STATUS_MESSAGE =
"Unknown status message. Please contact Snowflake support for further assistance";

public static final String MALFORMED_REQUEST_STATUS_MESSAGE =
"The SDK generated a malformed request. Please contact Snowflake support for further "
+ " assistance";

private final long statusCode;

Expand Down