You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "turboFei (via GitHub)" <gi...@apache.org> on 2023/04/25 03:23:17 UTC
[GitHub] [kyuubi] turboFei opened a new pull request, #4767: Correct the submit time for BatchJobSubmission
turboFei opened a new pull request, #4767:
URL: https://github.com/apache/kyuubi/pull/4767
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/CONTRIBUTING.html
2. If the PR is related to an issue in https://github.com/apache/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] turboFei commented on pull request #4767: Correct the submit time for BatchJobSubmission and check applicationInfo if submitted application
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#issuecomment-1524489437
thanks, merged to 1.7.1/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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] turboFei commented on a diff in pull request #4767: Correct the submit time for BatchJobSubmission and check applicationInfo if submitted application
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on code in PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#discussion_r1176168569
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -78,6 +78,9 @@ class BatchJobSubmission(
@volatile private var _appStartTime = recoveryMetadata.map(_.engineOpenTime).getOrElse(0L)
def appStartTime: Long = _appStartTime
+ def appStarted: Boolean = _appStartTime > 0
+
+ private lazy val _submitTime = if (_appStartTime > 0) _appStartTime else System.currentTimeMillis
Review Comment:
done
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] codecov-commenter commented on pull request #4767: Correct the submit time for BatchJobSubmission
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#issuecomment-1521165264
## [Codecov](https://codecov.io/gh/apache/kyuubi/pull/4767?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 [#4767](https://codecov.io/gh/apache/kyuubi/pull/4767?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3d1e8f0) into [master](https://codecov.io/gh/apache/kyuubi/commit/b0d07f7086556be3d3b4246f7674673d95359f78?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b0d07f7) will **decrease** coverage by `0.04%`.
> The diff coverage is `33.33%`.
```diff
@@ Coverage Diff @@
## master #4767 +/- ##
============================================
- Coverage 57.94% 57.91% -0.04%
Complexity 13 13
============================================
Files 581 581
Lines 32423 32421 -2
Branches 4309 4308 -1
============================================
- Hits 18787 18775 -12
- Misses 11831 11837 +6
- Partials 1805 1809 +4
```
| [Impacted Files](https://codecov.io/gh/apache/kyuubi/pull/4767?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../apache/kyuubi/server/api/v1/BatchesResource.scala](https://codecov.io/gh/apache/kyuubi/pull/4767?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL0JhdGNoZXNSZXNvdXJjZS5zY2FsYQ==) | `70.66% <0.00%> (ø)` | |
| [...g/apache/kyuubi/operation/BatchJobSubmission.scala](https://codecov.io/gh/apache/kyuubi/pull/4767?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vQmF0Y2hKb2JTdWJtaXNzaW9uLnNjYWxh) | `77.09% <50.00%> (-0.81%)` | :arrow_down: |
... and [8 files with indirect coverage changes](https://codecov.io/gh/apache/kyuubi/pull/4767/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] turboFei commented on pull request #4767: Correct the submit time for BatchJobSubmission
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#issuecomment-1521133953
WIP
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] turboFei commented on pull request #4767: Correct the submit time for BatchJobSubmission and check applicationInfo if submitted application
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#issuecomment-1521477761
all comments addressed. @pan3793
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] turboFei commented on a diff in pull request #4767: Correct the submit time for BatchJobSubmission
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on code in PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#discussion_r1176039912
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala:
##########
@@ -297,7 +297,8 @@ private[v1] class BatchesResource extends ApiRequestContext with Logging {
val batchAppStatus = sessionManager.applicationManager.getApplicationInfo(
metadata.clusterManager,
batchId,
- Some(metadata.createTime))
+ // prevent that the batch be marked as terminated if application state is NOT_FOUND
+ Some(System.currentTimeMillis()))
Review Comment:
createTime is the session create time not batch submit time.
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] turboFei commented on pull request #4767: Correct the submit time for BatchJobSubmission
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei commented on PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#issuecomment-1521107589
thanks @zwangsheng , also cc @pan3793
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] zwangsheng commented on a diff in pull request #4767: Correct the submit time for BatchJobSubmission
Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#discussion_r1176037014
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala:
##########
@@ -297,7 +297,8 @@ private[v1] class BatchesResource extends ApiRequestContext with Logging {
val batchAppStatus = sessionManager.applicationManager.getApplicationInfo(
metadata.clusterManager,
batchId,
- Some(metadata.createTime))
+ // prevent that the batch be marked as terminated if application state is NOT_FOUND
+ Some(System.currentTimeMillis()))
Review Comment:
Why not using `createTime`?
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4767: Correct the submit time for BatchJobSubmission and check applicationInfo if submitted application
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#discussion_r1176179319
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -265,7 +262,19 @@ class BatchJobSubmission(
throw new KyuubiException(s"Process exit with value ${process.exitValue()}")
}
- applicationId(_applicationInfo).foreach(monitorBatchJob)
+ while (!appStarted && applicationId(_applicationInfo).isEmpty && !applicationTerminated(
+ _applicationInfo)) {
Review Comment:
```suggestion
while (!appStarted && applicationId(_applicationInfo).isEmpty &&
!applicationTerminated(_applicationInfo)) {
```
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] turboFei closed pull request #4767: Correct the submit time for BatchJobSubmission and check applicationInfo if submitted application
Posted by "turboFei (via GitHub)" <gi...@apache.org>.
turboFei closed pull request #4767: Correct the submit time for BatchJobSubmission and check applicationInfo if submitted application
URL: https://github.com/apache/kyuubi/pull/4767
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] zwangsheng commented on a diff in pull request #4767: Correct the submit time for BatchJobSubmission and check applicationInfo if submitted application
Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#discussion_r1176159084
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -78,6 +78,9 @@ class BatchJobSubmission(
@volatile private var _appStartTime = recoveryMetadata.map(_.engineOpenTime).getOrElse(0L)
def appStartTime: Long = _appStartTime
+ def appStarted: Boolean = _appStartTime > 0
+
+ private lazy val _submitTime = if (_appStartTime > 0) _appStartTime else System.currentTimeMillis
Review Comment:
if (appStarted)
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4767: Correct the submit time for BatchJobSubmission and check applicationInfo if submitted application
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#discussion_r1176189258
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala:
##########
@@ -265,7 +262,19 @@ class BatchJobSubmission(
throw new KyuubiException(s"Process exit with value ${process.exitValue()}")
}
- applicationId(_applicationInfo).foreach(monitorBatchJob)
+ while (!appStarted && applicationId(_applicationInfo).isEmpty && !applicationTerminated(
+ _applicationInfo)) {
+ Thread.sleep(applicationCheckInterval)
+ updateApplicationInfoMetadataIfNeeded()
+ }
+
+ applicationId(_applicationInfo) match {
+ case Some(appId) => monitorBatchJob(appId)
+ case None if !appStarted =>
+ throw new RuntimeException(
Review Comment:
I suppose this is a reachable branch, then use KyuubiException instead of RuntimeException.
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4767: Correct the submit time for BatchJobSubmission and check applicationInfo if submitted application
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4767:
URL: https://github.com/apache/kyuubi/pull/4767#discussion_r1176178692
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala:
##########
@@ -297,7 +297,8 @@ private[v1] class BatchesResource extends ApiRequestContext with Logging {
val batchAppStatus = sessionManager.applicationManager.getApplicationInfo(
metadata.clusterManager,
batchId,
- Some(metadata.createTime))
+ // prevent that the batch be marked as terminated if application state is NOT_FOUND
+ Some(System.currentTimeMillis()))
Review Comment:
`metadata.engineOpenTime`?
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org