Skip to content

Commit 3191fa2

Browse files
committed
[KYUUBI #4106][FOLLOWUP] Rename conf key of uploaded batch resource
### _Why are the changes needed?_ As discussed #4144 (comment), we should put the conf key into namespace `kyuubi.batch.` ### _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.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4394 from pan3793/4106-followup. Closes #4106 27c9ed8 [Cheng Pan] nit 66283ac [Cheng Pan] [KYUUBI #4106][FOLLOUP] Rename conf key of uploaded batch resource Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent 3b73e1d commit 3191fa2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ object KyuubiReservedKeys {
2525
final val KYUUBI_SESSION_SIGN_PUBLICKEY = "kyuubi.session.sign.publickey"
2626
final val KYUUBI_SESSION_USER_SIGN = "kyuubi.session.user.sign"
2727
final val KYUUBI_SESSION_REAL_USER_KEY = "kyuubi.session.real.user"
28-
final val KYUUBI_SESSION_BATCH_RESOURCE_UPLOADED_KEY = "kyuubi.session.batch.resource.uploaded"
2928
final val KYUUBI_SESSION_CONNECTION_URL_KEY = "kyuubi.session.connection.url"
29+
final val KYUUBI_BATCH_RESOURCE_UPLOADED_KEY = "kyuubi.batch.resource.uploaded"
3030
final val KYUUBI_STATEMENT_ID_KEY = "kyuubi.statement.id"
3131
final val KYUUBI_ENGINE_ID = "kyuubi.engine.id"
3232
final val KYUUBI_ENGINE_NAME = "kyuubi.engine.name"

kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ private[v1] class BatchesResource extends ApiRequestContext with Logging {
214214
val ipAddress = fe.getIpAddress
215215
request.setConf(
216216
(request.getConf.asScala ++ Map(
217+
KYUUBI_BATCH_RESOURCE_UPLOADED_KEY -> isResourceFromUpload.toString,
217218
KYUUBI_CLIENT_IP_KEY -> ipAddress,
218219
KYUUBI_SERVER_IP_KEY -> fe.host,
219220
KYUUBI_SESSION_CONNECTION_URL_KEY -> fe.connectionUrl,
220-
KYUUBI_SESSION_BATCH_RESOURCE_UPLOADED_KEY -> isResourceFromUpload.toString,
221221
KYUUBI_SESSION_REAL_USER_KEY -> fe.getRealUser())).asJava)
222222
val sessionHandle = sessionManager.openBatchSession(
223223
userName,

kyuubi-server/src/main/scala/org/apache/kyuubi/session/KyuubiBatchSessionImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class KyuubiBatchSessionImpl(
7979

8080
// whether the resource file is from uploading
8181
private[kyuubi] val isResourceUploaded: Boolean = batchRequest.getConf
82-
.getOrDefault(KyuubiReservedKeys.KYUUBI_SESSION_BATCH_RESOURCE_UPLOADED_KEY, "false").toBoolean
82+
.getOrDefault(KyuubiReservedKeys.KYUUBI_BATCH_RESOURCE_UPLOADED_KEY, "false").toBoolean
8383

8484
private[kyuubi] lazy val batchJobSubmissionOp = sessionManager.operationManager
8585
.newBatchJobSubmissionOperation(

0 commit comments

Comments
 (0)