NealSun96 opened a new pull request #1231:
URL: https://github.com/apache/helix/pull/1231
### Issues
- [x] My PR addresses the following Helix issues and references them in the
PR description:
Fixes #1230
### Description
- [x] Here are some details about my PR, including screenshots of any UI
changes:
- A new field is added to JobConfig in order to support terminal state job
purging: TerminalStateExpiry. Necessary functions are implemented to support
the new field.
- A new set of logic is added to TaskGarbageCollectionStage. When purging
jobs, terminal state jobs will be considered based on the new expiry value. In
addition, a "failed job propagation" logic is put in place. This accounts for
the jobs that fail due to parental job failures, because these jobs would not
have JobContexts, preventing them to be purged through normal means; with the
propagation logic they can be purged along with the failed parental jobs.
- Modify scheduleJobCleanUp usage to correctly reflect the expiry used. The
previous code wasn't necessary as FAILED jobs were not cleaned up anyways, but
now it has a meaning.
- Modify jobDispatcher to honor TIMED_OUT job states.
### Tests
- [x] The following tests are written for this issue:
testJobQueueFailedCleanUp, testJobQueueTimedOutCleanUp,
testGetExpiredJobsFromCacheFailPropagation
- [x] The following is the result of the "mvn test" command on the
appropriate module:
```
[ERROR] Tests run: 1169, Failures: 3, Errors: 0, Skipped: 1, Time elapsed:
4,424.711 s <<< FAILURE! - in TestSuite
[ERROR] testResourceSubset(org.apache.helix.tools.TestClusterStateVerifier)
Time elapsed: 1.028 s <<< FAILURE!
org.apache.helix.HelixException: Failed to create pause signal
at
org.apache.helix.tools.TestClusterStateVerifier.testResourceSubset(TestClusterStateVerifier.java:115)
[ERROR] afterMethod(org.apache.helix.tools.TestClusterStateVerifier) Time
elapsed: 1.063 s <<< FAILURE!
java.lang.IllegalStateException: ZkClient already closed!
at
org.apache.helix.tools.TestClusterStateVerifier.afterMethod(TestClusterStateVerifier.java:98)
[ERROR]
testEnableCompressionResource(org.apache.helix.integration.TestEnableCompression)
Time elapsed: 143.923 s <<< FAILURE!
java.lang.AssertionError: expected:<true> but was:<false>
at
org.apache.helix.integration.TestEnableCompression.testEnableCompressionResource(TestEnableCompression.java:117)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestEnableCompression.testEnableCompressionResource:117
expected:<true> but was:<false>
[ERROR] TestClusterStateVerifier.afterMethod:98 » IllegalState ZkClient
already closed...
[ERROR] TestClusterStateVerifier.testResourceSubset:115 » Helix Failed to
create pause...
[INFO]
[ERROR] Tests run: 1169, Failures: 3, Errors: 0, Skipped: 1
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 01:13 h
[INFO] Finished at: 2020-08-07T01:35:47-07:00
[INFO]
------------------------------------------------------------------------
```
Rerun
```
[ERROR] Tests run: 4, Failures: 2, Errors: 0, Skipped: 0, Time elapsed:
31.429 s <<< FAILURE! - in TestSuite
[ERROR] testResourceSubset(org.apache.helix.tools.TestClusterStateVerifier)
Time elapsed: 1.056 s <<< FAILURE!
org.apache.helix.HelixException: Failed to create pause signal
at
org.apache.helix.tools.TestClusterStateVerifier.testResourceSubset(TestClusterStateVerifier.java:115)
[ERROR] afterMethod(org.apache.helix.tools.TestClusterStateVerifier) Time
elapsed: 1.075 s <<< FAILURE!
java.lang.IllegalStateException: ZkClient already closed!
at
org.apache.helix.tools.TestClusterStateVerifier.afterMethod(TestClusterStateVerifier.java:98)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestClusterStateVerifier.afterMethod:98 » IllegalState ZkClient
already closed...
[ERROR] TestClusterStateVerifier.testResourceSubset:115 » Helix Failed to
create pause...
[INFO]
[ERROR] Tests run: 4, Failures: 2, Errors: 0, Skipped: 0
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 36.782 s
[INFO] Finished at: 2020-08-07T09:51:51-07:00
[INFO]
------------------------------------------------------------------------
```
Rerun
```
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.521
s - in org.apache.helix.tools.TestClusterStateVerifier
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 14.777 s
[INFO] Finished at: 2020-08-07T09:53:55-07:00
[INFO]
------------------------------------------------------------------------
```
### Commits
- My commits all reference appropriate Apache Helix GitHub issues in their
subject lines. In addition, my commits follow the guidelines from "[How to
write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Code Quality
- My diff has been formatted using helix-style.xml
(helix-style-intellij.xml if IntelliJ IDE is used)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]