File tree 4 files changed +55
-1
lines changed
database-commons/src/main/java/io/cdap/plugin/util
mariadb-plugin/src/main/java/io/cdap/plugin/mariadb
4 files changed +55
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ public final class DBUtils {
61
61
62
62
public static final Calendar PURE_GREGORIAN_CALENDAR = createPureGregorianCalender ();
63
63
public static final String MYSQL_SUPPORTED_DOC_URL = "https://dev.mysql.com/doc/mysql-errors/9.0/en/" ;
64
+ public static final String MARIADB_SUPPORTED_DOC_URL = "https://mariadb.com/kb/en/mariadb-error-codes/" ;
64
65
public static final String MSSQL_SUPPORTED_DOC_URL =
65
66
"https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors" ;
66
67
public static final String CLOUDSQLMYSQL_SUPPORTED_DOC_URL = "https://cloud.google.com/sql/docs/mysql/error-messages" ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright © 2025 Cask Data, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5
+ * use this file except in compliance with the License. You may obtain a copy of
6
+ * the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ * License for the specific language governing permissions and limitations under
14
+ * the License.
15
+ */
16
+
17
+ package io .cdap .plugin .mariadb ;
18
+
19
+
20
+ import io .cdap .plugin .mysql .MysqlErrorDetailsProvider ;
21
+ import io .cdap .plugin .util .DBUtils ;
22
+
23
+ /**
24
+ * A custom ErrorDetailsProvider for MariaDb plugins.
25
+ */
26
+ public class MariadbErrorDetailsProvider extends MysqlErrorDetailsProvider {
27
+
28
+ @ Override
29
+ protected String getExternalDocumentationLink () {
30
+ return DBUtils .MARIADB_SUPPORTED_DOC_URL ;
31
+ }
32
+
33
+ }
Original file line number Diff line number Diff line change 25
25
import io .cdap .plugin .db .SchemaReader ;
26
26
import io .cdap .plugin .db .config .DBSpecificSinkConfig ;
27
27
import io .cdap .plugin .db .sink .AbstractDBSink ;
28
+ import io .cdap .plugin .util .DBUtils ;
28
29
29
- import io .cdap .plugin .mysql .MysqlDBRecord ;
30
30
import java .util .Map ;
31
31
import javax .annotation .Nullable ;
32
32
@@ -60,6 +60,16 @@ protected SchemaReader getSchemaReader() {
60
60
}
61
61
62
62
63
+ @ Override
64
+ protected String getErrorDetailsProviderClassName () {
65
+ return MariadbErrorDetailsProvider .class .getName ();
66
+ }
67
+
68
+ @ Override
69
+ protected String getExternalDocumentationLink () {
70
+ return DBUtils .MARIADB_SUPPORTED_DOC_URL ;
71
+ }
72
+
63
73
/**
64
74
* MariaDB Sink Config.
65
75
*/
Original file line number Diff line number Diff line change @@ -81,6 +81,16 @@ protected SchemaReader getSchemaReader() {
81
81
return new MariadbSchemaReader (null , mariadbSourceConfig .getConnectionArguments ());
82
82
}
83
83
84
+ @ Override
85
+ protected String getErrorDetailsProviderClassName () {
86
+ return MariadbErrorDetailsProvider .class .getName ();
87
+ }
88
+
89
+ @ Override
90
+ protected String getExternalDocumentationLink () {
91
+ return DBUtils .MARIADB_SUPPORTED_DOC_URL ;
92
+ }
93
+
84
94
/**
85
95
* MaraiDB source mariadbSourceConfig.
86
96
*/
You can’t perform that action at this time.
0 commit comments