This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 152dab9 THRIFT-5237: FOLLOWUP: Add a new constructor for TSocket
152dab9 is described below
commit 152dab945cbf5377595e07e87b336a9871aa5949
Author: Yuming Wang <[email protected]>
AuthorDate: Mon Oct 18 23:29:39 2021 +0800
THRIFT-5237: FOLLOWUP: Add a new constructor for TSocket
Workaround for this issue:
https://github.com/apache/spark/pull/34280#issuecomment-945814566
---
lib/java/src/org/apache/thrift/transport/TSocket.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lib/java/src/org/apache/thrift/transport/TSocket.java
b/lib/java/src/org/apache/thrift/transport/TSocket.java
index eb73e8e..aef2a3f 100644
--- a/lib/java/src/org/apache/thrift/transport/TSocket.java
+++ b/lib/java/src/org/apache/thrift/transport/TSocket.java
@@ -118,6 +118,18 @@ public class TSocket extends TIOStreamTransport {
* Creates a new unconnected socket that will connect to the given host
* on the given port.
*
+ * @param host Remote host
+ * @param port Remote port
+ * @param timeout Socket timeout and connection timeout
+ */
+ public TSocket(String host, int port, int timeout) throws
TTransportException {
+ this(new TConfiguration(), host, port, timeout, timeout);
+ }
+
+ /**
+ * Creates a new unconnected socket that will connect to the given host
+ * on the given port.
+ *
* @param config check config
* @param host Remote host
* @param port Remote port