embulk-output-mysql 0.7.9 → 0.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/classpath/{embulk-output-jdbc-0.7.9.jar → embulk-output-jdbc-0.7.10.jar} +0 -0
- data/classpath/embulk-output-mysql-0.7.10.jar +0 -0
- data/src/main/java/org/embulk/output/MySQLOutputPlugin.java +21 -15
- data/src/main/java/org/embulk/output/mysql/MySQLOutputConnection.java +16 -0
- metadata +4 -4
- data/classpath/embulk-output-mysql-0.7.9.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 692465de551dae9499e788eedd698511da8446cd
|
4
|
+
data.tar.gz: a35c2e193ed89e1402d08abb9562e55c6a29beb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42d2e2458b4d575eaa38b0e1fbb8b9e4aed52c96c8a8c9ffa6d31bd2f14d0448f3445cdb5d6990f0747dd587060e2e1f55666a248d7bf8bc29681937a25889dd
|
7
|
+
data.tar.gz: cfe4ff6a46f0cddc4001680d98ddc422965a74fd7aadc282944bd6887f49407b023560483cac9893ee39f9849a6ede18f5b52c35d8d60769adcd8ad789d19b45
|
data/README.md
CHANGED
@@ -14,6 +14,7 @@ MySQL output plugin for Embulk loads records to MySQL.
|
|
14
14
|
- **port**: database port number (integer, default: 3306)
|
15
15
|
- **user**: database login user name (string, required)
|
16
16
|
- **password**: database login password (string, default: "")
|
17
|
+
- **ssl**: use SSL to connect to the database (string, default: `disable`. `enable` uses SSL without server-side validation and `verify` checks the certificate. For compatibility reasons, `true` behaves as `enable` and `false` behaves as `disable`.)
|
17
18
|
- **database**: destination database name (string, required)
|
18
19
|
- **temp_database**: database name for intermediate tables. by default, intermediate tables will be created in the database specified by `database`. (string, optional)
|
19
20
|
- **table**: destination table name (string, required)
|
Binary file
|
Binary file
|
@@ -9,6 +9,7 @@ import com.google.common.base.Optional;
|
|
9
9
|
import org.embulk.config.Config;
|
10
10
|
import org.embulk.config.ConfigDefault;
|
11
11
|
import org.embulk.output.jdbc.AbstractJdbcOutputPlugin;
|
12
|
+
import org.embulk.output.jdbc.Ssl;
|
12
13
|
import org.embulk.output.jdbc.BatchInsert;
|
13
14
|
import org.embulk.output.jdbc.JdbcOutputConnection;
|
14
15
|
import org.embulk.output.jdbc.MergeConfig;
|
@@ -44,6 +45,11 @@ public class MySQLOutputPlugin
|
|
44
45
|
@Config("temp_database")
|
45
46
|
@ConfigDefault("null")
|
46
47
|
public Optional<String> getTempDatabase();
|
48
|
+
|
49
|
+
@Config("ssl")
|
50
|
+
@ConfigDefault("\"disable\"") // backward compatibility
|
51
|
+
public Ssl getSsl();
|
52
|
+
|
47
53
|
}
|
48
54
|
|
49
55
|
@Override
|
@@ -80,21 +86,21 @@ public class MySQLOutputPlugin
|
|
80
86
|
// Socket options TCP_KEEPCNT, TCP_KEEPIDLE, and TCP_KEEPINTVL are not configurable.
|
81
87
|
props.setProperty("tcpKeepAlive", "true");
|
82
88
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
89
|
+
switch (t.getSsl()) {
|
90
|
+
case DISABLE:
|
91
|
+
props.setProperty("useSSL", "false");
|
92
|
+
break;
|
93
|
+
case ENABLE:
|
94
|
+
props.setProperty("useSSL", "true");
|
95
|
+
props.setProperty("requireSSL", "true");
|
96
|
+
props.setProperty("verifyServerCertificate", "false");
|
97
|
+
break;
|
98
|
+
case VERIFY:
|
99
|
+
props.setProperty("useSSL", "true");
|
100
|
+
props.setProperty("requireSSL", "true");
|
101
|
+
props.setProperty("verifyServerCertificate", "true");
|
102
|
+
break;
|
103
|
+
}
|
98
104
|
|
99
105
|
if (!retryableMetadataOperation) {
|
100
106
|
// non-retryable batch operation uses longer timeout
|
@@ -119,4 +119,20 @@ public class MySQLOutputConnection
|
|
119
119
|
timeZoneComparison.compareTimeZone();
|
120
120
|
}
|
121
121
|
|
122
|
+
//
|
123
|
+
//
|
124
|
+
// The MySQL Connector/J 5.1.35 introduce new option `Current MySQL Connect`.
|
125
|
+
// It has incompatibility behavior current version and 5.1.35.
|
126
|
+
//
|
127
|
+
// This method announces users about this change before the update driver version.
|
128
|
+
//
|
129
|
+
@Override
|
130
|
+
public void showDriverVersion() throws SQLException {
|
131
|
+
super.showDriverVersion();
|
132
|
+
logger.warn("This plugin will update MySQL Connector/J version in the near future release.");
|
133
|
+
logger.warn("It has some incompatibility changes.");
|
134
|
+
logger.warn("For example, the 5.1.35 introduced `noTimezoneConversionForDateType` and `cacheDefaultTimezone` options.");
|
135
|
+
logger.warn("Please read a document and make sure configuration carefully before updating the plugin.");
|
136
|
+
}
|
137
|
+
|
122
138
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-output-mysql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Inserts or updates records to a table.
|
14
14
|
email:
|
@@ -19,8 +19,8 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- README.md
|
21
21
|
- build.gradle
|
22
|
-
- classpath/embulk-output-jdbc-0.7.
|
23
|
-
- classpath/embulk-output-mysql-0.7.
|
22
|
+
- classpath/embulk-output-jdbc-0.7.10.jar
|
23
|
+
- classpath/embulk-output-mysql-0.7.10.jar
|
24
24
|
- classpath/mysql-connector-java-5.1.34.jar
|
25
25
|
- lib/embulk/output/mysql.rb
|
26
26
|
- src/main/java/org/embulk/output/MySQLOutputPlugin.java
|
Binary file
|