Skip to content

Commit 2b806ad

Browse files
committed
change jdbcPluginName required to true for Mysql
1 parent 7f1fc26 commit 2b806ad

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

mysql-plugin/src/main/java/io/cdap/plugin/mysql/MysqlConnectorConfig.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@
1616

1717
package io.cdap.plugin.mysql;
1818

19+
import io.cdap.cdap.api.annotation.Description;
20+
import io.cdap.cdap.api.annotation.Macro;
21+
import io.cdap.cdap.api.annotation.Name;
22+
import io.cdap.plugin.db.ConnectionConfig;
1923
import io.cdap.plugin.db.connector.AbstractDBSpecificConnectorConfig;
20-
2124
import java.util.Properties;
25+
import javax.annotation.Nullable;
26+
2227

2328
/**
2429
* Configuration for Mysql Connector
@@ -36,10 +41,15 @@ public MysqlConnectorConfig(String host, int port, String user, String password,
3641
this.port = port;
3742
this.user = user;
3843
this.password = password;
39-
this.jdbcPluginName = jdbcPluginName;
4044
this.connectionArguments = connectionArguments;
4145
}
4246

47+
@Name(ConnectionConfig.JDBC_PLUGIN_NAME)
48+
@Description("Name of the JDBC driver to use. This is the value of the 'jdbcPluginName' key defined in the JSON " +
49+
"file for the JDBC plugin.")
50+
@Macro
51+
private String jdbcPluginName;
52+
4353
@Override
4454
public String getConnectionString() {
4555
return String.format(MYSQL_CONNECTION_STRING_FORMAT, host, getPort());
@@ -50,6 +60,11 @@ public int getDefaultPort() {
5060
return 3306;
5161
}
5262

63+
@Override
64+
public String getJdbcPluginName() {
65+
return jdbcPluginName;
66+
}
67+
5368
@Override
5469
public Properties getConnectionArgumentsProperties() {
5570
Properties prop = super.getConnectionArgumentsProperties();

0 commit comments

Comments
 (0)