Skip to content

Commit 13e618c

Browse files
committed
[KYUUBI #3012] Remove unused thrift request max attempts and related ut
### _Why are the changes needed?_ After #2948 and #2953, the OPERATION_THRIFT_CLIENT_REQUEST_MAX_ATTEMPTS is not used. In this pr, I remove the attempts config entry and related ut that based on the request attempts. ### _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 - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3012 from turboFei/follow_up_engine_alive. Closes #3012 3d15e44 [Fei Wang] remove deprecated docs 89c9f2c [Fei Wang] remove docs edb6ff2 [Fei Wang] remove ut 696bd85 [Fei Wang] saev f91c61b [Fei Wang] remove unused attempt Authored-by: Fei Wang <fwang12@ebay.com> Signed-off-by: Fei Wang <fwang12@ebay.com>
1 parent 3203829 commit 13e618c

File tree

5 files changed

+1
-53
lines changed

5 files changed

+1
-53
lines changed

docs/deployment/settings.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,7 @@ kyuubi.operation.query.timeout|&lt;undefined&gt;|Timeout for query executions at
395395
kyuubi.operation.result.max.rows|0|Max rows of Spark query results. Rows that exceeds the limit would be ignored. By setting this value to 0 to disable the max rows limit.|int|1.6.0
396396
kyuubi.operation.scheduler.pool|&lt;undefined&gt;|The scheduler pool of job. Note that, this config should be used after change Spark config spark.scheduler.mode=FAIR.|string|1.1.1
397397
kyuubi.operation.spark.listener.enabled|true|When set to true, Spark engine registers a SQLOperationListener before executing the statement, logs a few summary statistics when each stage completes.|boolean|1.6.0
398-
kyuubi.operation.status.polling.max.attempts|5|(deprecated) - Using kyuubi.operation.thrift.client.request.max.attempts instead|int|1.4.0
399398
kyuubi.operation.status.polling.timeout|PT5S|Timeout(ms) for long polling asynchronous running sql query's status|duration|1.0.0
400-
kyuubi.operation.thrift.client.request.max.attempts|5|Max attempts for operation thrift request call at server-side on raw transport failures, e.g. TTransportException|int|1.6.0
401399

402400

403401
### Server

kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,23 +1154,6 @@ object KyuubiConf {
11541154
.timeConf
11551155
.createWithDefault(Duration.ofSeconds(5).toMillis)
11561156

1157-
@deprecated(s"using kyuubi.operation.thrift.client.request.max.attempts instead", "1.6.0")
1158-
val OPERATION_STATUS_POLLING_MAX_ATTEMPTS: ConfigEntry[Int] =
1159-
buildConf("kyuubi.operation.status.polling.max.attempts")
1160-
.doc(s"(deprecated) - Using kyuubi.operation.thrift.client.request.max.attempts instead")
1161-
.version("1.4.0")
1162-
.intConf
1163-
.createWithDefault(5)
1164-
1165-
val OPERATION_THRIFT_CLIENT_REQUEST_MAX_ATTEMPTS: ConfigEntry[Int] =
1166-
buildConf("kyuubi.operation.thrift.client.request.max.attempts")
1167-
.doc("Max attempts for operation thrift request call at server-side on raw transport" +
1168-
" failures, e.g. TTransportException")
1169-
.version("1.6.0")
1170-
.intConf
1171-
.checkValue(_ > 0, "must be positive number")
1172-
.createWithDefault(5)
1173-
11741157
val OPERATION_FORCE_CANCEL: ConfigEntry[Boolean] =
11751158
buildConf("kyuubi.operation.interrupt.on.cancel")
11761159
.doc("When true, all running tasks will be interrupted if one cancels a query. " +

kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import org.apache.kyuubi.util.{ThreadUtils, ThriftUtils}
4141

4242
class KyuubiSyncThriftClient private (
4343
protocol: TProtocol,
44-
maxAttempts: Int,
4544
engineAliveProbeProtocol: Option[TProtocol],
4645
engineAliveProbeInterval: Long,
4746
engineAliveTimeout: Long)
@@ -458,7 +457,6 @@ private[kyuubi] object KyuubiSyncThriftClient extends Logging {
458457
conf: KyuubiConf): KyuubiSyncThriftClient = {
459458
val passwd = Option(password).filter(_.nonEmpty).getOrElse("anonymous")
460459
val loginTimeout = conf.get(ENGINE_LOGIN_TIMEOUT).toInt
461-
val requestMaxAttempts = conf.get(KyuubiConf.OPERATION_THRIFT_CLIENT_REQUEST_MAX_ATTEMPTS)
462460
val aliveProbeEnabled = conf.get(KyuubiConf.ENGINE_ALIVE_PROBE_ENABLED)
463461
val aliveProbeInterval = conf.get(KyuubiConf.ENGINE_ALIVE_PROBE_INTERVAL).toInt
464462
val aliveTimeout = conf.get(KyuubiConf.ENGINE_ALIVE_TIMEOUT)
@@ -473,7 +471,6 @@ private[kyuubi] object KyuubiSyncThriftClient extends Logging {
473471
}
474472
new KyuubiSyncThriftClient(
475473
tProtocol,
476-
requestMaxAttempts,
477474
aliveProbeProtocol,
478475
aliveProbeInterval,
479476
aliveTimeout)

kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerConnectionSuite.scala

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -210,35 +210,6 @@ class KyuubiOperationPerConnectionSuite extends WithKyuubiServer with HiveJDBCTe
210210
assert(kyuubiConnection.isClosed)
211211
}
212212
}
213-
214-
test("KYUUBI #2102 - support engine alive probe to fast fail on engine broken") {
215-
withSessionConf(Map(
216-
KyuubiConf.ENGINE_ALIVE_PROBE_ENABLED.key -> "true",
217-
KyuubiConf.ENGINE_ALIVE_PROBE_INTERVAL.key -> "1000",
218-
KyuubiConf.ENGINE_ALIVE_TIMEOUT.key -> "3000",
219-
KyuubiConf.OPERATION_THRIFT_CLIENT_REQUEST_MAX_ATTEMPTS.key -> "10000"))(Map.empty)(
220-
Map.empty) {
221-
withSessionHandle { (client, handle) =>
222-
val preReq = new TExecuteStatementReq()
223-
preReq.setStatement("select engine_name()")
224-
preReq.setSessionHandle(handle)
225-
preReq.setRunAsync(false)
226-
client.ExecuteStatement(preReq)
227-
228-
val executeStmtReq = new TExecuteStatementReq()
229-
executeStmtReq.setStatement("select java_method('java.lang.System', 'exit', 1)")
230-
executeStmtReq.setSessionHandle(handle)
231-
executeStmtReq.setRunAsync(false)
232-
val startTime = System.currentTimeMillis()
233-
val executeStmtResp = client.ExecuteStatement(executeStmtReq)
234-
assert(executeStmtResp.getStatus.getStatusCode === TStatusCode.ERROR_STATUS)
235-
assert(executeStmtResp.getStatus.getErrorMessage contains
236-
"Caused by: java.net.SocketException: Connection reset")
237-
val elapsedTime = System.currentTimeMillis() - startTime
238-
assert(elapsedTime > 3 * 1000 && elapsedTime < 20 * 1000)
239-
}
240-
}
241-
}
242213
}
243214

244215
class TestSessionConfAdvisor extends SessionConfAdvisor {

kyuubi-server/src/test/scala/org/apache/kyuubi/operation/KyuubiOperationPerUserSuite.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ class KyuubiOperationPerUserSuite extends WithKyuubiServer with SparkQueryTests
161161
withSessionConf(Map(
162162
KyuubiConf.ENGINE_ALIVE_PROBE_ENABLED.key -> "true",
163163
KyuubiConf.ENGINE_ALIVE_PROBE_INTERVAL.key -> "1000",
164-
KyuubiConf.ENGINE_ALIVE_TIMEOUT.key -> "3000",
165-
KyuubiConf.OPERATION_THRIFT_CLIENT_REQUEST_MAX_ATTEMPTS.key -> "10000"))(Map.empty)(
164+
KyuubiConf.ENGINE_ALIVE_TIMEOUT.key -> "1000"))(Map.empty)(
166165
Map.empty) {
167166
withSessionHandle { (client, handle) =>
168167
val preReq = new TExecuteStatementReq()

0 commit comments

Comments
 (0)