NealSun96 opened a new pull request #1167:
URL: https://github.com/apache/helix/pull/1167
### Issues
- [x] My PR addresses the following Helix issues and references them in the
PR description:
Fixes #1166
### Description
- [x] Here are some details about my PR, including screenshots of any UI
changes:
WAGED Rebalancer by design only supports one-off migration of resources. As
a result, its `getBaselineAssignment()` did not consider the case of a cluster
that's partially managed by WAGED. It tries to get baselines for all resources
from the cluster; if there's no baseline data, it gets current states for all
resources as a fallback. It doesn't care for resources that don't have baseline
while other resources have baselines - when that's the case, the resources that
don't have baseline will not fallback to their current states; they will simply
not have baselines.
The logic is now changed to a per resource level. If a resource has
baseline, the baseline will be used; else, the current state will be used.
### Tests
- [x] The following is the result of the "mvn test" command on the
appropriate module:
```
[ERROR] Tests run: 1154, Failures: 4, Errors: 0, Skipped: 1, Time elapsed:
4,377.518 s <<< FAILURE! - in TestSuite
[ERROR] testResourceSubset(org.apache.helix.tools.TestClusterStateVerifier)
Time elapsed: 1.029 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.066 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: 156.767 s <<< FAILURE!
java.lang.AssertionError: expected:<true> but was:<false>
at
org.apache.helix.integration.TestEnableCompression.testEnableCompressionResource(TestEnableCompression.java:117)
[ERROR]
testStateTransitionTimeOut(org.apache.helix.integration.paticipant.TestStateTransitionTimeoutWithResource)
Time elapsed: 14 s <<< FAILURE!
java.lang.AssertionError: expected:<true> but was:<false>
at
org.apache.helix.integration.paticipant.TestStateTransitionTimeoutWithResource.testStateTransitionTimeOut(TestStateTransitionTimeoutWithResource.java:174)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] TestEnableCompression.testEnableCompressionResource:117
expected:<true> but was:<false>
[ERROR]
TestStateTransitionTimeoutWithResource.testStateTransitionTimeOut:174
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: 1154, Failures: 4, Errors: 0, Skipped: 1
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 01:13 h
[INFO] Finished at: 2020-07-21T16:11:53-07:00
[INFO]
------------------------------------------------------------------------
```
Rerun
```
[ERROR] Tests run: 6, Failures: 2, Errors: 0, Skipped: 0, Time elapsed:
48.808 s <<< FAILURE! - in TestSuite
[ERROR] testResourceSubset(org.apache.helix.tools.TestClusterStateVerifier)
Time elapsed: 1.036 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.062 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: 6, Failures: 2, Errors: 0, Skipped: 0
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 54.218 s
[INFO] Finished at: 2020-07-21T16:19:22-07:00
[INFO]
------------------------------------------------------------------------
```
Rerun
```
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.489
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.500 s
[INFO] Finished at: 2020-07-21T16:20:04-07:00
[INFO]
------------------------------------------------------------------------
```
### Commits
- [x] 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
- [x] 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]