You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/09/10 08:10:35 UTC
[GitHub] [incubator-kyuubi] zhouyifan279 opened a new pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
zhouyifan279 opened a new pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074
### _Why are the changes needed?_
This PR finishes issue #916
### _How was this patch tested?_
- [x] 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/latest/develop_tools/testing.html#running-tests) locally before make a pull request
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706095184
##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLBackendService.scala
##########
@@ -33,9 +38,40 @@ import org.apache.kyuubi.session.SessionManager
* that this backend service holds to run [[org.apache.kyuubi.operation.Operation]]s.
*/
class SparkSQLBackendService(name: String, spark: SparkSession)
- extends AbstractBackendService(name) {
+ extends AbstractBackendService(name) with Logging {
def this(spark: SparkSession) = this(classOf[SparkSQLBackendService].getSimpleName, spark)
override val sessionManager: SessionManager = new SparkSQLSessionManager(spark)
+
+ override def renewDelegationToken(
+ sessionHandle: SessionHandle,
+ authFactory: KyuubiAuthenticationFactory,
+ tokenStr: String): Unit =
+ synchronized {
+ // We hacked `TCLIService.Iface.RenewDelegationToken` to transfer Credentials from Kyuubi
+ // Server to Spark SQL engine
+ val newCreds = KyuubiHadoopUtils.decodeCredentials(tokenStr)
+ val currentUser = UserGroupInformation.getCurrentUser
+ val oldCreds = KyuubiHadoopUtils.getCredentialsInternal(currentUser)
+
+ val updateCreds = new Credentials()
+ KyuubiHadoopUtils.getTokenMap(newCreds).foreach { case (alias, newToken) =>
+ val oldToken = oldCreds.getToken(alias)
+ if (oldToken == null) {
+ updateCreds.addToken(alias, newToken)
+ } else {
+ if (KyuubiHadoopUtils.getTokenIssueDate(newToken) >
+ KyuubiHadoopUtils.getTokenIssueDate(oldToken)) {
+ updateCreds.addToken(alias, newToken)
+ } else {
+ warn(s"Ignore token with earlier issue date: $newToken")
+ }
+ }
+ }
+ SparkContextHelper.updateDelegationTokens(
Review comment:
How about `updateCreds.numberOfTokens() > 1` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#issuecomment-917683914
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1074](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b5b6188) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/1b8927274999ef5519309032873b43d3b9c11569?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1b89272) will **decrease** coverage by `0.08%`.
> The diff coverage is `76.28%`.
> :exclamation: Current head b5b6188 differs from pull request most recent head 3612c30. Consider uploading reports for the commit 3612c30 to get more accurate results
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1074 +/- ##
============================================
- Coverage 78.70% 78.61% -0.09%
Complexity 71 71
============================================
Files 172 173 +1
Lines 6324 6411 +87
Branches 730 737 +7
============================================
+ Hits 4977 5040 +63
- Misses 920 940 +20
- Partials 427 431 +4
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../kyuubi/credentials/HadoopCredentialsManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jcmVkZW50aWFscy9IYWRvb3BDcmVkZW50aWFsc01hbmFnZXIuc2NhbGE=) | `94.84% <0.00%> (-0.95%)` | :arrow_down: |
| [...a/org/apache/spark/kyuubi/SparkContextHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3Bhcmsva3l1dWJpL1NwYXJrQ29udGV4dEhlbHBlci5zY2FsYQ==) | `53.84% <40.00%> (-46.16%)` | :arrow_down: |
| [...ala/org/apache/kyuubi/util/KyuubiHadoopUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS91dGlsL0t5dXViaUhhZG9vcFV0aWxzLnNjYWxh) | `70.27% <52.38%> (-23.48%)` | :arrow_down: |
| [.../kyuubi/client/KyuubiSyncThriftClientHandler.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jbGllbnQvS3l1dWJpU3luY1RocmlmdENsaWVudEhhbmRsZXIuc2NhbGE=) | `86.36% <86.36%> (ø)` | |
| [.../apache/kyuubi/service/ThriftFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RocmlmdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `96.73% <90.00%> (-0.27%)` | :arrow_down: |
| [...e/kyuubi/engine/spark/SparkSQLBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1NRTEJhY2tlbmRTZXJ2aWNlLnNjYWxh) | `94.73% <93.75%> (-5.27%)` | :arrow_down: |
| [...apache/kyuubi/service/AbstractBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL0Fic3RyYWN0QmFja2VuZFNlcnZpY2Uuc2NhbGE=) | `84.09% <100.00%> (+0.36%)` | :arrow_up: |
| [.../apache/kyuubi/client/KyuubiSyncThriftClient.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jbGllbnQvS3l1dWJpU3luY1RocmlmdENsaWVudC5zY2FsYQ==) | `82.60% <100.00%> (+0.58%)` | :arrow_up: |
| [...ain/scala/org/apache/kyuubi/engine/EngineRef.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvRW5naW5lUmVmLnNjYWxh) | `78.94% <100.00%> (ø)` | |
| [.../org/apache/kyuubi/session/KyuubiSessionImpl.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0t5dXViaVNlc3Npb25JbXBsLnNjYWxh) | `89.28% <100.00%> (-0.30%)` | :arrow_down: |
| ... and [4 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1b89272...3612c30](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706095184
##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLBackendService.scala
##########
@@ -33,9 +38,40 @@ import org.apache.kyuubi.session.SessionManager
* that this backend service holds to run [[org.apache.kyuubi.operation.Operation]]s.
*/
class SparkSQLBackendService(name: String, spark: SparkSession)
- extends AbstractBackendService(name) {
+ extends AbstractBackendService(name) with Logging {
def this(spark: SparkSession) = this(classOf[SparkSQLBackendService].getSimpleName, spark)
override val sessionManager: SessionManager = new SparkSQLSessionManager(spark)
+
+ override def renewDelegationToken(
+ sessionHandle: SessionHandle,
+ authFactory: KyuubiAuthenticationFactory,
+ tokenStr: String): Unit =
+ synchronized {
+ // We hacked `TCLIService.Iface.RenewDelegationToken` to transfer Credentials from Kyuubi
+ // Server to Spark SQL engine
+ val newCreds = KyuubiHadoopUtils.decodeCredentials(tokenStr)
+ val currentUser = UserGroupInformation.getCurrentUser
+ val oldCreds = KyuubiHadoopUtils.getCredentialsInternal(currentUser)
+
+ val updateCreds = new Credentials()
+ KyuubiHadoopUtils.getTokenMap(newCreds).foreach { case (alias, newToken) =>
+ val oldToken = oldCreds.getToken(alias)
+ if (oldToken == null) {
+ updateCreds.addToken(alias, newToken)
+ } else {
+ if (KyuubiHadoopUtils.getTokenIssueDate(newToken) >
+ KyuubiHadoopUtils.getTokenIssueDate(oldToken)) {
+ updateCreds.addToken(alias, newToken)
+ } else {
+ warn(s"Ignore token with earlier issue date: $newToken")
+ }
+ }
+ }
+ SparkContextHelper.updateDelegationTokens(
Review comment:
How about `updateCreds.numberOfTokens() > 0` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706739149
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
Just think of that there is a problem in another case:
User designates a HDFS service or Hive metastore server different from the one in kyuubi server's configuration in JDBC url or in user scope configuration.
It should be fine to `DFSClient` because we update tokens by alias and HDFS delegation token's alias is the NameNode address. We will just add some tokens not needed.
But it is a problem to `HiveMetaStoreClient` because Hive delegation token's alias is fixed to "hive.server2.delegation.token" in spark. The initial correct token will be updated to a token for another server.
To fix this problem, I think we should add the following procedure:
1. At kyuubi server side, set Hive delegation token's service name to Hive metastore uris.
2. At engine side, before update the token, select the first token whose metastore uris is compatible with the uris defined in HiveConf. Metastore uris are compatible if they have at least one same uri.
3. Set the token's service to "" and add it to engine's credentials. (Hive metastore delegation token's service in engine has to be "" as `HiveMetaStoreClient` selects the first token whose service is "" and kind is "HIVE_DELEGATION_TOKEN" to talk to server.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706739149
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
Just think of that there is a problem in another case:
User designates a HDFS service or Hive metastore server different from the one in kyuubi server's configuration.
It should be fine to `DFSClient` because we update tokens by alias and HDFS delegation token's alias is the NameNode address. We will just add some tokens not needed.
But it is a problem to `HiveMetaStoreClient` because Hive delegation token's alias is fixed to "hive.server2.delegation.token" in spark. The initial correct token will be updated to a token for another server.
To fix this problem, I think we should add the following procedure:
1. At kyuubi server side, set Hive delegation token's service name to Hive metastore uris.
2. At engine side, before update the token, select the first token whose metastore uris is compatible with the uris defined in HiveConf. Metastore uris are compatible if they have at least one same uri.
3. Set the token's service to "" and add it to engine's credentials. (Hive metastore delegation token's service in engine has to be "" as `HiveMetaStoreClient` selects the first token whose service is "" and kind is "HIVE_DELEGATION_TOKEN" to talk to server.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706062944
##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLBackendService.scala
##########
@@ -33,9 +38,40 @@ import org.apache.kyuubi.session.SessionManager
* that this backend service holds to run [[org.apache.kyuubi.operation.Operation]]s.
*/
class SparkSQLBackendService(name: String, spark: SparkSession)
- extends AbstractBackendService(name) {
+ extends AbstractBackendService(name) with Logging {
def this(spark: SparkSession) = this(classOf[SparkSQLBackendService].getSimpleName, spark)
override val sessionManager: SessionManager = new SparkSQLSessionManager(spark)
+
+ override def renewDelegationToken(
+ sessionHandle: SessionHandle,
+ authFactory: KyuubiAuthenticationFactory,
+ tokenStr: String): Unit =
+ synchronized {
+ // We hacked `TCLIService.Iface.RenewDelegationToken` to transfer Credentials from Kyuubi
+ // Server to Spark SQL engine
+ val newCreds = KyuubiHadoopUtils.decodeCredentials(tokenStr)
+ val currentUser = UserGroupInformation.getCurrentUser
+ val oldCreds = KyuubiHadoopUtils.getCredentialsInternal(currentUser)
+
+ val updateCreds = new Credentials()
+ KyuubiHadoopUtils.getTokenMap(newCreds).foreach { case (alias, newToken) =>
+ val oldToken = oldCreds.getToken(alias)
+ if (oldToken == null) {
+ updateCreds.addToken(alias, newToken)
+ } else {
+ if (KyuubiHadoopUtils.getTokenIssueDate(newToken) >
+ KyuubiHadoopUtils.getTokenIssueDate(oldToken)) {
+ updateCreds.addToken(alias, newToken)
+ } else {
+ warn(s"Ignore token with earlier issue date: $newToken")
+ }
+ }
+ }
+ SparkContextHelper.updateDelegationTokens(
Review comment:
shall we update delegation token if:
`KyuubiHadoopUtils.getTokenIssueDate(newToken) <= KyuubiHadoopUtils.getTokenIssueDate(oldToken)` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706959312
##########
File path: kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
##########
@@ -272,6 +272,19 @@ object KyuubiConf {
.booleanConf
.createWithDefault(true)
+ val CREDENTIALS_HIVE_EXTRA_METASTORE_URIS: ConfigEntry[Seq[String]] =
Review comment:
why do we need this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706070438
##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLBackendService.scala
##########
@@ -33,9 +38,40 @@ import org.apache.kyuubi.session.SessionManager
* that this backend service holds to run [[org.apache.kyuubi.operation.Operation]]s.
*/
class SparkSQLBackendService(name: String, spark: SparkSession)
- extends AbstractBackendService(name) {
+ extends AbstractBackendService(name) with Logging {
def this(spark: SparkSession) = this(classOf[SparkSQLBackendService].getSimpleName, spark)
override val sessionManager: SessionManager = new SparkSQLSessionManager(spark)
+
+ override def renewDelegationToken(
+ sessionHandle: SessionHandle,
+ authFactory: KyuubiAuthenticationFactory,
Review comment:
where do we use it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706739149
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
Just think of that there is a problem in another case:
User designates a HDFS service or Hive metastore server in JDBC url or in user scope configuration, which is different from service address in kyuubi server's configuration .
It should be fine to `DFSClient` because we update tokens by alias and HDFS delegation token's alias is the NameNode address. We will just add some tokens which are not needed.
But it is a problem to `HiveMetaStoreClient` because Hive delegation token's alias is fixed to "hive.server2.delegation.token" in spark. The initial correct token will be updated to a token for another server.
To fix this problem, I think we should add the following procedure:
1. At kyuubi server side, set Hive delegation token's service name to Hive metastore uris.
2. At engine side, before update the token, select the first token whose metastore uris is compatible with the uris defined in HiveConf. Metastore uris are compatible if they have at least one same uri.
3. Set the token's service to "" and add it to engine's credentials. Hive delegation token's service has to be "" as `HiveMetaStoreClient` selects the first token whose service is "" and kind is "HIVE_DELEGATION_TOKEN" to talk to server.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r707097641
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala
##########
@@ -120,6 +118,13 @@ class ExecuteStatement(
val ke = KyuubiSQLException(s"UNKNOWN STATE for $statement")
setOperationException(ke)
}
+
+ val appUser = session.asInstanceOf[KyuubiSessionImpl].engine.appUser
+ val sessionManager = session.sessionManager.asInstanceOf[KyuubiSessionManager]
+ sessionManager.credentialsManager.sendCredentialsIfNeeded(
Review comment:
do we need send token if remote state is terminated ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#issuecomment-916718521
@yaooqinn @ulysses-you @pan3793 Ready to be reviewed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706067126
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala
##########
@@ -30,7 +30,67 @@ import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
import org.apache.kyuubi.session.SessionHandle
import org.apache.kyuubi.util.ThriftUtils
-class KyuubiSyncThriftClient(protocol: TProtocol) extends TCLIService.Client(protocol) {
+trait KyuubiSyncThriftClient {
Review comment:
Is this necessary to create this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r707221738
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala
##########
@@ -120,6 +118,13 @@ class ExecuteStatement(
val ke = KyuubiSQLException(s"UNKNOWN STATE for $statement")
setOperationException(ke)
}
+
+ val appUser = session.asInstanceOf[KyuubiSessionImpl].engine.appUser
+ val sessionManager = session.sessionManager.asInstanceOf[KyuubiSessionManager]
+ sessionManager.credentialsManager.sendCredentialsIfNeeded(
Review comment:
No matter where in `ExecuteStatement#waitStatementComplete` we put the send method, there is possibility that Statement has been terminated when we send credentials.
Let's make the possibility more obvious.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#issuecomment-917683914
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1074](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (28176c7) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/1b8927274999ef5519309032873b43d3b9c11569?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1b89272) will **decrease** coverage by `0.04%`.
> The diff coverage is `73.14%`.
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1074 +/- ##
============================================
- Coverage 78.70% 78.65% -0.05%
Complexity 71 71
============================================
Files 172 174 +2
Lines 6324 6516 +192
Branches 730 773 +43
============================================
+ Hits 4977 5125 +148
- Misses 920 942 +22
- Partials 427 449 +22
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../kyuubi/credentials/HadoopCredentialsManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jcmVkZW50aWFscy9IYWRvb3BDcmVkZW50aWFsc01hbmFnZXIuc2NhbGE=) | `94.84% <0.00%> (-0.95%)` | :arrow_down: |
| [...a/org/apache/spark/kyuubi/SparkContextHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3Bhcmsva3l1dWJpL1NwYXJrQ29udGV4dEhlbHBlci5zY2FsYQ==) | `53.84% <40.00%> (-46.16%)` | :arrow_down: |
| [...ala/org/apache/kyuubi/util/KyuubiHadoopUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS91dGlsL0t5dXViaUhhZG9vcFV0aWxzLnNjYWxh) | `70.27% <52.38%> (-23.48%)` | :arrow_down: |
| [...uubi/engine/spark/SparkThriftFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1RocmlmdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `80.00% <80.00%> (ø)` | |
| [...e/kyuubi/engine/spark/SparkSQLBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1NRTEJhY2tlbmRTZXJ2aWNlLnNjYWxh) | `100.00% <100.00%> (ø)` | |
| [...rg/apache/kyuubi/engine/spark/SparkSQLEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1NRTEVuZ2luZS5zY2FsYQ==) | `68.00% <100.00%> (ø)` | |
| [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jb25maWcvS3l1dWJpQ29uZi5zY2FsYQ==) | `95.30% <100.00%> (ø)` | |
| [.../apache/kyuubi/service/ThriftFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RocmlmdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `97.00% <100.00%> (ø)` | |
| [.../apache/kyuubi/client/KyuubiSyncThriftClient.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jbGllbnQvS3l1dWJpU3luY1RocmlmdENsaWVudC5zY2FsYQ==) | `82.97% <100.00%> (+0.95%)` | :arrow_up: |
| [...ain/scala/org/apache/kyuubi/engine/EngineRef.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvRW5naW5lUmVmLnNjYWxh) | `78.94% <100.00%> (ø)` | |
| ... and [20 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1b89272...28176c7](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] ulysses-you closed pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r707047875
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala
##########
@@ -30,7 +30,67 @@ import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation
import org.apache.kyuubi.session.SessionHandle
import org.apache.kyuubi.util.ThriftUtils
-class KyuubiSyncThriftClient(protocol: TProtocol) extends TCLIService.Client(protocol) {
+trait KyuubiSyncThriftClient {
Review comment:
Removed dynamic proxy and send delegation tokens only during `ExecuteStatement#waitStatementComplete`.
No longer need to change `KyuubiSyncThriftClient` to a trait.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706978774
##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLBackendService.scala
##########
@@ -33,9 +38,40 @@ import org.apache.kyuubi.session.SessionManager
* that this backend service holds to run [[org.apache.kyuubi.operation.Operation]]s.
*/
class SparkSQLBackendService(name: String, spark: SparkSession)
- extends AbstractBackendService(name) {
+ extends AbstractBackendService(name) with Logging {
def this(spark: SparkSession) = this(classOf[SparkSQLBackendService].getSimpleName, spark)
override val sessionManager: SessionManager = new SparkSQLSessionManager(spark)
+
+ override def renewDelegationToken(
+ sessionHandle: SessionHandle,
+ authFactory: KyuubiAuthenticationFactory,
Review comment:
Moved method to a new class `SparkThriftFrontendService`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706739149
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
Just think of that there is a problem in another case:
User designates a HDFS service or Hive metastore server in JDBC url or in user scope configuration, which is different from service address in kyuubi server's configuration .
It should be fine to `DFSClient` because we update tokens by alias and HDFS delegation token's alias is the NameNode address. We can skip updating if engine does not have an alias.
But it is a problem to `HiveMetaStoreClient` because Hive delegation token's alias is fixed to "hive.server2.delegation.token" in spark. The initial correct token will be updated to a token for another server.
To fix this problem, I think we should add the following procedure:
1. At kyuubi server side, set Hive delegation token's alias to Hive metastore uris.
2. At engine side, before updating the token, select the first token sent by kyuubi server whose metastore uris is compatible with the uris defined in engine HiveConf. Metastore uris are compatible if they have at least one same uri.
3. Add the selected token to engine's credentials with alias "hive.server2.delegation.token".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706736250
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
Credentials will also be sent to engine.
Actually, no matter engine has keytab or not, `DFSClient` and `HiveMetaStore` always use Tokens to talk with server. So there should be not difference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706736250
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
Credentials will also be sent to engine.
Actually, no matter engine has keytab or not is not, `DFSClient` and `HiveMetaStore` always use Tokens to talk with server. So there should be not difference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] ulysses-you commented on pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#issuecomment-918938078
thanks, merging to master !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706965480
##########
File path: kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
##########
@@ -272,6 +272,19 @@ object KyuubiConf {
.booleanConf
.createWithDefault(true)
+ val CREDENTIALS_HIVE_EXTRA_METASTORE_URIS: ConfigEntry[Seq[String]] =
Review comment:
> Kyuubi administrator can set this conf to let kyuubi renew token for extra Hive metastore servers, which are not in hive-site.xml.
why didn't he modify the hive-site.xml directly?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#issuecomment-917683914
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1074](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3612c30) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/1b8927274999ef5519309032873b43d3b9c11569?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1b89272) will **decrease** coverage by `0.69%`.
> The diff coverage is `75.19%`.
> :exclamation: Current head 3612c30 differs from pull request most recent head 5a323e7. Consider uploading reports for the commit 5a323e7 to get more accurate results
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1074 +/- ##
============================================
- Coverage 78.70% 78.00% -0.70%
Complexity 71 71
============================================
Files 172 174 +2
Lines 6324 6466 +142
Branches 730 745 +15
============================================
+ Hits 4977 5044 +67
- Misses 920 985 +65
- Partials 427 437 +10
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../kyuubi/credentials/HadoopCredentialsManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jcmVkZW50aWFscy9IYWRvb3BDcmVkZW50aWFsc01hbmFnZXIuc2NhbGE=) | `94.84% <0.00%> (-0.95%)` | :arrow_down: |
| [...a/org/apache/spark/kyuubi/SparkContextHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3Bhcmsva3l1dWJpL1NwYXJrQ29udGV4dEhlbHBlci5zY2FsYQ==) | `53.84% <40.00%> (-46.16%)` | :arrow_down: |
| [...ala/org/apache/kyuubi/util/KyuubiHadoopUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS91dGlsL0t5dXViaUhhZG9vcFV0aWxzLnNjYWxh) | `70.27% <52.38%> (-23.48%)` | :arrow_down: |
| [...uubi/engine/spark/SparkThriftFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1RocmlmdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `80.00% <80.00%> (ø)` | |
| [...uubi/credentials/HiveDelegationTokenProvider.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jcmVkZW50aWFscy9IaXZlRGVsZWdhdGlvblRva2VuUHJvdmlkZXIuc2NhbGE=) | `86.20% <84.21%> (-1.30%)` | :arrow_down: |
| [...e/kyuubi/engine/spark/SparkSQLBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1NRTEJhY2tlbmRTZXJ2aWNlLnNjYWxh) | `100.00% <100.00%> (ø)` | |
| [...rg/apache/kyuubi/engine/spark/SparkSQLEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1NRTEVuZ2luZS5zY2FsYQ==) | `68.00% <100.00%> (ø)` | |
| [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jb25maWcvS3l1dWJpQ29uZi5zY2FsYQ==) | `95.35% <100.00%> (+0.05%)` | :arrow_up: |
| [.../apache/kyuubi/service/ThriftFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RocmlmdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `97.00% <100.00%> (ø)` | |
| [.../apache/kyuubi/client/KyuubiSyncThriftClient.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jbGllbnQvS3l1dWJpU3luY1RocmlmdENsaWVudC5zY2FsYQ==) | `82.97% <100.00%> (+0.95%)` | :arrow_up: |
| ... and [14 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1b89272...5a323e7](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706973376
##########
File path: kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
##########
@@ -272,6 +272,19 @@ object KyuubiConf {
.booleanConf
.createWithDefault(true)
+ val CREDENTIALS_HIVE_EXTRA_METASTORE_URIS: ConfigEntry[Seq[String]] =
Review comment:
User specified Hive metastore server may not belong to the Hive metastore cluster defined in hive-site.xml.
As this is a patch of `HiveDelegationTokenProvider`, I'll remove it from this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#issuecomment-917683914
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1074](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5a323e7) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/1b8927274999ef5519309032873b43d3b9c11569?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1b89272) will **decrease** coverage by `0.69%`.
> The diff coverage is `75.75%`.
> :exclamation: Current head 5a323e7 differs from pull request most recent head b6c931b. Consider uploading reports for the commit b6c931b to get more accurate results
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1074 +/- ##
============================================
- Coverage 78.70% 78.00% -0.70%
Complexity 71 71
============================================
Files 172 174 +2
Lines 6324 6466 +142
Branches 730 745 +15
============================================
+ Hits 4977 5044 +67
- Misses 920 985 +65
- Partials 427 437 +10
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../kyuubi/credentials/HadoopCredentialsManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jcmVkZW50aWFscy9IYWRvb3BDcmVkZW50aWFsc01hbmFnZXIuc2NhbGE=) | `94.84% <0.00%> (-0.95%)` | :arrow_down: |
| [...a/org/apache/spark/kyuubi/SparkContextHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3Bhcmsva3l1dWJpL1NwYXJrQ29udGV4dEhlbHBlci5zY2FsYQ==) | `53.84% <40.00%> (-46.16%)` | :arrow_down: |
| [...ala/org/apache/kyuubi/util/KyuubiHadoopUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS91dGlsL0t5dXViaUhhZG9vcFV0aWxzLnNjYWxh) | `70.27% <52.38%> (-23.48%)` | :arrow_down: |
| [...uubi/engine/spark/SparkThriftFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1RocmlmdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `80.00% <80.00%> (ø)` | |
| [...uubi/credentials/HiveDelegationTokenProvider.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jcmVkZW50aWFscy9IaXZlRGVsZWdhdGlvblRva2VuUHJvdmlkZXIuc2NhbGE=) | `86.20% <84.21%> (-1.30%)` | :arrow_down: |
| [...e/kyuubi/engine/spark/SparkSQLBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1NRTEJhY2tlbmRTZXJ2aWNlLnNjYWxh) | `100.00% <100.00%> (ø)` | |
| [...rg/apache/kyuubi/engine/spark/SparkSQLEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1NRTEVuZ2luZS5zY2FsYQ==) | `68.00% <100.00%> (ø)` | |
| [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jb25maWcvS3l1dWJpQ29uZi5zY2FsYQ==) | `95.35% <100.00%> (+0.05%)` | :arrow_up: |
| [.../apache/kyuubi/service/ThriftFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RocmlmdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `97.00% <100.00%> (ø)` | |
| [.../apache/kyuubi/client/KyuubiSyncThriftClient.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jbGllbnQvS3l1dWJpU3luY1RocmlmdENsaWVudC5zY2FsYQ==) | `82.97% <100.00%> (+0.95%)` | :arrow_up: |
| ... and [14 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1b89272...b6c931b](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r707221738
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/operation/ExecuteStatement.scala
##########
@@ -120,6 +118,13 @@ class ExecuteStatement(
val ke = KyuubiSQLException(s"UNKNOWN STATE for $statement")
setOperationException(ke)
}
+
+ val appUser = session.asInstanceOf[KyuubiSessionImpl].engine.appUser
+ val sessionManager = session.sessionManager.asInstanceOf[KyuubiSessionManager]
+ sessionManager.credentialsManager.sendCredentialsIfNeeded(
Review comment:
No matter where in `ExecuteStatement#waitStatementComplete` we put the send method, there is possibility that Statement has been closed terminated when we send credentials.
Let's make the possibility more obvious.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706978774
##########
File path: externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLBackendService.scala
##########
@@ -33,9 +38,40 @@ import org.apache.kyuubi.session.SessionManager
* that this backend service holds to run [[org.apache.kyuubi.operation.Operation]]s.
*/
class SparkSQLBackendService(name: String, spark: SparkSession)
- extends AbstractBackendService(name) {
+ extends AbstractBackendService(name) with Logging {
def this(spark: SparkSession) = this(classOf[SparkSQLBackendService].getSimpleName, spark)
override val sessionManager: SessionManager = new SparkSQLSessionManager(spark)
+
+ override def renewDelegationToken(
+ sessionHandle: SessionHandle,
+ authFactory: KyuubiAuthenticationFactory,
Review comment:
Moved method to a new class `SparkThriftFrontendService` to avoid introducing redundant method to other `BackendService`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706065619
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
what happen if user has given engine keytab ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706736250
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
Credentials will also be sent to engine.
Actually, no matter engine has keytab or not, `DFSClient` and `HiveMetaStoreClient` always use Tokens to talk with server. So there should be no difference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706739149
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
Just think of that there is a problem in another case:
User designates a HDFS service or Hive metastore server different from the one in kyuubi server's configuration in JDBC url or in user scope configuration.
It should be fine to `DFSClient` because we update tokens by alias and HDFS delegation token's alias is the NameNode address. We will just add some tokens which are not needed.
But it is a problem to `HiveMetaStoreClient` because Hive delegation token's alias is fixed to "hive.server2.delegation.token" in spark. The initial correct token will be updated to a token for another server.
To fix this problem, I think we should add the following procedure:
1. At kyuubi server side, set Hive delegation token's service name to Hive metastore uris.
2. At engine side, before update the token, select the first token whose metastore uris is compatible with the uris defined in HiveConf. Metastore uris are compatible if they have at least one same uri.
3. Set the token's service to "" and add it to engine's credentials. Hive delegation token's service has to be "" as `HiveMetaStoreClient` selects the first token whose service is "" and kind is "HIVE_DELEGATION_TOKEN" to talk to server.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706964796
##########
File path: kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
##########
@@ -272,6 +272,19 @@ object KyuubiConf {
.booleanConf
.createWithDefault(true)
+ val CREDENTIALS_HIVE_EXTRA_METASTORE_URIS: ConfigEntry[Seq[String]] =
Review comment:
Kyuubi administrator can set this conf to let kyuubi renew token for extra Hive metastore servers, which are not in hive-site.xml.
Without this, if user specified any other Hive metastore server in JDBC url, kyuubi engine can not access it after the initial token expires.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] zhouyifan279 commented on a change in pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
zhouyifan279 commented on a change in pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#discussion_r706739149
##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClientHandler.scala
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.client
+
+import java.lang.reflect.{InvocationHandler, InvocationTargetException, Method}
+
+import org.apache.kyuubi.credentials.HadoopCredentialsManager
+import org.apache.kyuubi.session.SessionHandle
+
+class KyuubiSyncThriftClientHandler(
+ credentialsManager: HadoopCredentialsManager,
+ client: KyuubiSyncThriftClient,
+ sessionId: String,
+ appUser: String) extends InvocationHandler {
+
+ override def invoke(proxy: Any, method: Method, args: Array[AnyRef]): AnyRef = {
+ credentialsManager.sendCredentialsIfNeeded(
Review comment:
Just think of that there is a problem in another case:
User designates a HDFS service or Hive metastore server in JDBC url or in user scope configuration, which is different from service address in kyuubi server's configuration .
It should be fine to `DFSClient` because we update tokens by alias and HDFS delegation token's alias is the NameNode address. We can skip updating if engine does not have an alias.
But it is a problem to `HiveMetaStoreClient` because Hive delegation token's alias is fixed to "hive.server2.delegation.token" in spark. The initial correct token will be updated to a token for another server.
To fix this problem, I think we should add the following procedure:
1. At kyuubi server side, set Hive delegation token's alias to Hive metastore uris.
2. At engine side, before updating the token, select the first token in sent credentials whose metastore uris is compatible with the uris defined in engine HiveConf. Metastore uris are compatible if they have at least one same uri.
3. Add the selected token to engine's credentials with alias "hive.server2.delegation.token".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1074: [KYUUBI #916] Send DelegationTokens to SQL engines
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1074:
URL: https://github.com/apache/incubator-kyuubi/pull/1074#issuecomment-917683914
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1074](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3612c30) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/1b8927274999ef5519309032873b43d3b9c11569?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1b89272) will **decrease** coverage by `0.69%`.
> The diff coverage is `75.19%`.
[](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #1074 +/- ##
============================================
- Coverage 78.70% 78.00% -0.70%
Complexity 71 71
============================================
Files 172 174 +2
Lines 6324 6466 +142
Branches 730 745 +15
============================================
+ Hits 4977 5044 +67
- Misses 920 985 +65
- Partials 427 437 +10
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../kyuubi/credentials/HadoopCredentialsManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jcmVkZW50aWFscy9IYWRvb3BDcmVkZW50aWFsc01hbmFnZXIuc2NhbGE=) | `94.84% <0.00%> (-0.95%)` | :arrow_down: |
| [...a/org/apache/spark/kyuubi/SparkContextHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3Bhcmsva3l1dWJpL1NwYXJrQ29udGV4dEhlbHBlci5zY2FsYQ==) | `53.84% <40.00%> (-46.16%)` | :arrow_down: |
| [...ala/org/apache/kyuubi/util/KyuubiHadoopUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS91dGlsL0t5dXViaUhhZG9vcFV0aWxzLnNjYWxh) | `70.27% <52.38%> (-23.48%)` | :arrow_down: |
| [...uubi/engine/spark/SparkThriftFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1RocmlmdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `80.00% <80.00%> (ø)` | |
| [...uubi/credentials/HiveDelegationTokenProvider.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jcmVkZW50aWFscy9IaXZlRGVsZWdhdGlvblRva2VuUHJvdmlkZXIuc2NhbGE=) | `86.20% <84.21%> (-1.30%)` | :arrow_down: |
| [...e/kyuubi/engine/spark/SparkSQLBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1NRTEJhY2tlbmRTZXJ2aWNlLnNjYWxh) | `100.00% <100.00%> (ø)` | |
| [...rg/apache/kyuubi/engine/spark/SparkSQLEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1NRTEVuZ2luZS5zY2FsYQ==) | `68.00% <100.00%> (ø)` | |
| [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jb25maWcvS3l1dWJpQ29uZi5zY2FsYQ==) | `95.35% <100.00%> (+0.05%)` | :arrow_up: |
| [.../apache/kyuubi/service/ThriftFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RocmlmdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `97.00% <100.00%> (ø)` | |
| [.../apache/kyuubi/client/KyuubiSyncThriftClient.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jbGllbnQvS3l1dWJpU3luY1RocmlmdENsaWVudC5zY2FsYQ==) | `82.97% <100.00%> (+0.95%)` | :arrow_up: |
| ... and [14 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1b89272...3612c30](https://codecov.io/gh/apache/incubator-kyuubi/pull/1074?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org