src/main/java/org/embulk/input/MySQLInputPlugin.java in embulk-input-mysql-0.6.0 vs src/main/java/org/embulk/input/MySQLInputPlugin.java in embulk-input-mysql-0.6.1

- old
+ new

@@ -2,11 +2,10 @@ import java.util.Properties; import java.sql.Connection; import java.sql.Driver; import java.sql.SQLException; -import com.google.common.base.Throwables; import org.embulk.config.Config; import org.embulk.config.ConfigDefault; import org.embulk.input.jdbc.AbstractJdbcInputPlugin; import org.embulk.input.mysql.MySQLInputConnection; @@ -56,11 +55,11 @@ // java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date props.setProperty("zeroDateTimeBehavior", "convertToNull"); props.setProperty("useCompression", "true"); - props.setProperty("connectTimeout", "300000"); // milliseconds - props.setProperty("socketTimeout", "1800000"); // smillieconds + props.setProperty("connectTimeout", String.valueOf(t.getConnectTimeout() * 1000)); // milliseconds + props.setProperty("socketTimeout", String.valueOf(t.getSocketTimeout() * 1000)); // milliseconds // Enable keepalive based on tcp_keepalive_time, tcp_keepalive_intvl and tcp_keepalive_probes kernel parameters. // Socket options TCP_KEEPCNT, TCP_KEEPIDLE, and TCP_KEEPINTVL are not configurable. props.setProperty("tcpKeepAlive", "true");