mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-19 10:29:35 +08:00
[improve][plugin][DRDS] The task of DRDS-Reader Big data fails with the following error 【net_write_timeout】
This commit is contained in:
parent
f6d21f112d
commit
e26f82ad76
@ -27,10 +27,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.*;
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.ResultSetMetaData;
|
|
||||||
import java.sql.Types;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -189,6 +186,18 @@ public class CommonRdbmsReader {
|
|||||||
DBUtil.dealWithSessionConfig(conn, readerSliceConfig,
|
DBUtil.dealWithSessionConfig(conn, readerSliceConfig,
|
||||||
this.dataBaseType, basicMsg);
|
this.dataBaseType, basicMsg);
|
||||||
|
|
||||||
|
//deal with drds big data error net_write_timeout
|
||||||
|
if (DataBaseType.DRDS.equals(dataBaseType)){
|
||||||
|
LOG.info("start DRDS setNetWorkTimeOut...");
|
||||||
|
try {
|
||||||
|
conn.setNetworkTimeout(Executors.newFixedThreadPool(1), 172800000);
|
||||||
|
LOG.info("end DRDS setNetWorkTimeOut...");
|
||||||
|
} catch (SQLException throwables) {
|
||||||
|
LOG.error("setNetWorkTimeOut error ["+throwables.getMessage()+"]");
|
||||||
|
throwables.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int columnNumber = 0;
|
int columnNumber = 0;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user