File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
common/src/main/java/org/apache/spark/sql/odps Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,11 @@ public class OdpsClient {
8181 private final static String META_LOOKUP_NAME = "META_LOOKUP_NAME" ;
8282 private final static String REFRESH_INTERVAL_SECONDS = "odps.cupid.bearer.token.refresh.interval.seconds" ;
8383 private final static String ODPS_BEARER_TOKEN_ENABLE = "odps.cupid.bearer.token.enable" ;
84- private static final int DEFAULT_TIMEOUT_IN_SECONDS = 300 ;
84+
85+ private final static String ODPS_TUNNEL_READ_TIMEOUT = "odps.tunnel.read.timeout.seconds" ;
86+ private final static String ODPS_TUNNEL_CONNECT_TIMEOUT = "odps.tunnel.connect.timeout.seconds" ;
87+ private final static String ODPS_TUNNEL_MAX_RETRIES = "odps.tunnel.max.retries" ;
88+ private final static String ODPS_TUNNEL_RETRY_WAIT_TIME = "odps.tunnel.retry.wait.seconds" ;
8589
8690 public static Builder builder () {
8791 return new Builder ();
@@ -165,7 +169,10 @@ public EnvironmentSettings getEnvironmentSettings() {
165169 .withAppStsAccount (odps .getAppStsAccount ())
166170 .build ();
167171 RestOptions restOptions = RestOptions .newBuilder ()
168- .withReadTimeout (DEFAULT_TIMEOUT_IN_SECONDS )
172+ .withReadTimeout (Integer .parseInt (getSettings (ODPS_TUNNEL_READ_TIMEOUT ).orElse ("300" )))
173+ .withConnectTimeout (Integer .parseInt (getSettings (ODPS_TUNNEL_CONNECT_TIMEOUT ).orElse ("20" )))
174+ .withRetryTimes (Integer .parseInt (getSettings (ODPS_TUNNEL_MAX_RETRIES ).orElse ("5" )))
175+ .withRetryWaitTimeInSeconds (Integer .parseInt (getSettings (ODPS_TUNNEL_RETRY_WAIT_TIME ).orElse ("5" )))
169176 .build ();
170177 EnvironmentSettings .Builder env = EnvironmentSettings .newBuilder ()
171178 .withDefaultProject (odps .getDefaultProject ())
Original file line number Diff line number Diff line change 2121 <packaging >pom</packaging >
2222 <properties >
2323 <arrow .version>4.0.0</arrow .version>
24- <odps .sdk.version>0.50.4 -public</odps .sdk.version>
25- <odps .sdk.table.version>0.50.4 -public</odps .sdk.table.version>
24+ <odps .sdk.version>0.50.5 -public</odps .sdk.version>
25+ <odps .sdk.table.version>0.50.5 -public</odps .sdk.table.version>
2626 <spark .version>3.3.1</spark .version>
2727 <scala .version>2.12.10</scala .version>
2828 <scala .binary.version>2.12</scala .binary.version>
You can’t perform that action at this time.
0 commit comments