[KYUUBI #4106][FOLLOWUP] Rename conf key of uploaded batch resource

### _Why are the changes needed?_

As discussed https://github.com/apache/kyuubi/pull/4144#discussion_r1112957149, 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

27c9ed870 [Cheng Pan] nit
66283ac4b [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>
This commit is contained in:
Cheng Pan 2023-02-21 22:00:43 +08:00
parent 3b73e1d64a
commit 3191fa22fc
No known key found for this signature in database
GPG Key ID: 8001952629BCC75D
3 changed files with 3 additions and 3 deletions

View File

@ -25,8 +25,8 @@ object KyuubiReservedKeys {
final val KYUUBI_SESSION_SIGN_PUBLICKEY = "kyuubi.session.sign.publickey"
final val KYUUBI_SESSION_USER_SIGN = "kyuubi.session.user.sign"
final val KYUUBI_SESSION_REAL_USER_KEY = "kyuubi.session.real.user"
final val KYUUBI_SESSION_BATCH_RESOURCE_UPLOADED_KEY = "kyuubi.session.batch.resource.uploaded"
final val KYUUBI_SESSION_CONNECTION_URL_KEY = "kyuubi.session.connection.url"
final val KYUUBI_BATCH_RESOURCE_UPLOADED_KEY = "kyuubi.batch.resource.uploaded"
final val KYUUBI_STATEMENT_ID_KEY = "kyuubi.statement.id"
final val KYUUBI_ENGINE_ID = "kyuubi.engine.id"
final val KYUUBI_ENGINE_NAME = "kyuubi.engine.name"

View File

@ -214,10 +214,10 @@ private[v1] class BatchesResource extends ApiRequestContext with Logging {
val ipAddress = fe.getIpAddress
request.setConf(
(request.getConf.asScala ++ Map(
KYUUBI_BATCH_RESOURCE_UPLOADED_KEY -> isResourceFromUpload.toString,
KYUUBI_CLIENT_IP_KEY -> ipAddress,
KYUUBI_SERVER_IP_KEY -> fe.host,
KYUUBI_SESSION_CONNECTION_URL_KEY -> fe.connectionUrl,
KYUUBI_SESSION_BATCH_RESOURCE_UPLOADED_KEY -> isResourceFromUpload.toString,
KYUUBI_SESSION_REAL_USER_KEY -> fe.getRealUser())).asJava)
val sessionHandle = sessionManager.openBatchSession(
userName,

View File

@ -79,7 +79,7 @@ class KyuubiBatchSessionImpl(
// whether the resource file is from uploading
private[kyuubi] val isResourceUploaded: Boolean = batchRequest.getConf
.getOrDefault(KyuubiReservedKeys.KYUUBI_SESSION_BATCH_RESOURCE_UPLOADED_KEY, "false").toBoolean
.getOrDefault(KyuubiReservedKeys.KYUUBI_BATCH_RESOURCE_UPLOADED_KEY, "false").toBoolean
private[kyuubi] lazy val batchJobSubmissionOp = sessionManager.operationManager
.newBatchJobSubmissionOperation(