You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/11/09 08:38:54 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #3787] Remove unused KyuubiSyncThriftClient::withRetryingRequ…
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 76b0c6fa5 [KYUUBI #3787] Remove unused KyuubiSyncThriftClient::withRetryingRequ…
76b0c6fa5 is described below
commit 76b0c6fa53eb8716f0e8fd192d58fc971a6830d5
Author: Tianlin Liao <ti...@ebay.com>
AuthorDate: Wed Nov 9 16:38:43 2022 +0800
[KYUUBI #3787] Remove unused KyuubiSyncThriftClient::withRetryingRequ…
…estNoLock method
### _Why are the changes needed?_
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #3788 from lightning-L/kyuubi-3787.
Closes #3787
ee12c8b9 [Tianlin Liao] [KYUUBI #3787] Remove unused KyuubiSyncThriftClient::withRetryingRequestNoLock method
Authored-by: Tianlin Liao <ti...@ebay.com>
Signed-off-by: Cheng Pan <ch...@apache.org>
---
.../kyuubi/client/KyuubiSyncThriftClient.scala | 28 ----------------------
1 file changed, 28 deletions(-)
diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala
index e0038799c..967a713f6 100644
--- a/kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala
+++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala
@@ -26,7 +26,6 @@ import scala.concurrent.duration.Duration
import com.google.common.annotations.VisibleForTesting
import org.apache.hive.service.rpc.thrift._
-import org.apache.thrift.TException
import org.apache.thrift.protocol.{TBinaryProtocol, TProtocol}
import org.apache.thrift.transport.TSocket
@@ -427,33 +426,6 @@ class KyuubiSyncThriftClient private (
private[kyuubi] object KyuubiSyncThriftClient extends Logging {
- private def withRetryingRequestNoLock[T](
- block: => T,
- request: String,
- maxAttempts: Int,
- remoteEngineBroken: Boolean,
- isConnectionValid: () => Boolean): (T, Boolean) = {
- var attemptCount = 1
-
- var resp: T = null.asInstanceOf[T]
- var shouldResetEngineBroken = false;
- while (attemptCount <= maxAttempts && resp == null) {
- try {
- resp = block
- shouldResetEngineBroken = true
- } catch {
- case e: TException if attemptCount < maxAttempts && isConnectionValid() =>
- warn(s"Failed to execute $request after $attemptCount/$maxAttempts times, retrying", e)
- attemptCount += 1
- Thread.sleep(100)
- case e: Throwable =>
- error(s"Failed to execute $request after $attemptCount/$maxAttempts times, aborting", e)
- throw e
- }
- }
- (resp, shouldResetEngineBroken)
- }
-
private def createTProtocol(
user: String,
passwd: String,