Skip to content

Add Abnormal States Resolver interface and configuration item.#1028

Merged
jiajunwang merged 3 commits intoapache:abnormalResolverfrom
jiajunwang:topstates
May 28, 2020
Merged

Add Abnormal States Resolver interface and configuration item.#1028
jiajunwang merged 3 commits intoapache:abnormalResolverfrom
jiajunwang:topstates

Conversation

@jiajunwang
Copy link
Contributor

@jiajunwang jiajunwang commented May 26, 2020

Issues

  • My PR addresses the following Helix issues and references them in the PR description:

#1027

Description

  • Here are some details about my PR, including screenshots of any UI changes:

The Abnormal States Resolver defines a generic interface to find and recover if the partition has any abnormal current states. For example,

  • double masters
  • application data out of sync
    The interface shall be implemented according to the requirement.

The resolver is applied in the rebalance process according to the corresponding cluster config item. For example,
"ABNORMAL_STATES_RESOLVER_MAP" : {
"MASTERSLAVE" : "org.apache.helix.api.rebalancer.constraint.MasterSlaveAbnormalStateReslovler"
}
The default behavior without any configuration is not doing any recovery work.

Tests

  • The following tests are written for this issue:

TestAbnormalStatesResolver
TestClusterConfig.testAbnormalStatesResolverConfig()

  • The following is the result of the "mvn test" command on the appropriate module:

helix-rest, All passed

helix-core,
[ERROR] Failures:
[ERROR] TestRebalanceRunningTask.testFixedTargetTaskAndEnabledRebalanceAndNodeAdded:330 expected: but was:
[ERROR] TestTaskThrottling.testTaskThrottle:98 expected:<10> but was:<0>
[ERROR] TestWorkflowTimeout.testWorkflowTimeoutWhenWorkflowCompleted:116 expected: but was:
[INFO]
[ERROR] Tests run: 1148, Failures: 3, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------

Rerun
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 50.296 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.539 s
[INFO] Finished at: 2020-05-27T09:53:49-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":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation (Optional)

  • In case of new functionality, my PR adds documentation in the following wiki page:

(Link the GitHub wiki you added)

Code Quality

  • My diff has been formatted using helix-style.xml
    (helix-style-intellij.xml if IntelliJ IDE is used)

Jiajun Wang added 2 commits May 26, 2020 12:45
The Abnormal States Resolver defines a generic interface to find and recover if the partition has any abnormal current states. For example,
- double masters
- application data out of sync
The interface shall be implemented according to the requirement.

The resolver is applied in the rebalance process according to the corresponding cluster config item. For example,
"ABNORMAL_STATES_RESOLVER_MAP" : {
 "MASTERSLAVE" : "org.apache.helix.api.rebalancer.constraint.MasterSlaveAbnormalStateReslovler"
}
The default behavior without any configuration is not doing any recovery work.
Copy link
Contributor

@junkaixue junkaixue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiajunwang
Copy link
Contributor Author

This PR is ready to be merged, approved by @dasahcc

@jiajunwang jiajunwang changed the base branch from master to abnormalResolver May 28, 2020 22:54
@jiajunwang
Copy link
Contributor Author

Will checkin to a separate branch for reviewing the later PRs.

@jiajunwang jiajunwang merged commit ac0be01 into apache:abnormalResolver May 28, 2020
@jiajunwang jiajunwang deleted the topstates branch May 28, 2020 22:55
jiajunwang added a commit that referenced this pull request Jun 9, 2020
The Abnormal States Resolver defines a generic interface to find and recover if the partition has any abnormal current states. For example,
- double masters
- application data out of sync
The interface shall be implemented according to the requirement.

The resolver is applied in the rebalance process according to the corresponding cluster config item. For example,
"ABNORMAL_STATES_RESOLVER_MAP" : {
 "MASTERSLAVE" : "org.apache.helix.api.rebalancer.constraint.MasterSlaveAbnormalStateReslovler"
}
The default behavior without any configuration is not doing any recovery work.
jiajunwang added a commit that referenced this pull request Jun 15, 2020
The Abnormal States Resolver defines a generic interface to find and recover if the partition has any abnormal current states. For example,
- double masters
- application data out of sync
The interface shall be implemented according to the requirement.

The resolver is applied in the rebalance process according to the corresponding cluster config item. For example,
"ABNORMAL_STATES_RESOLVER_MAP" : {
 "MASTERSLAVE" : "org.apache.helix.api.rebalancer.constraint.MasterSlaveAbnormalStateReslovler"
}
The default behavior without any configuration is not doing any recovery work.
jiajunwang added a commit that referenced this pull request Jun 15, 2020
The Abnormal States Resolver defines a generic interface to find and recover if the partition has any abnormal current states. For example,
- double masters
- application data out of sync
The interface shall be implemented according to the requirement.

The resolver is applied in the rebalance process according to the corresponding cluster config item. For example,
"ABNORMAL_STATES_RESOLVER_MAP" : {
 "MASTERSLAVE" : "org.apache.helix.api.rebalancer.constraint.MasterSlaveAbnormalStateReslovler"
}
The default behavior without any configuration is not doing any recovery work.
huizhilu pushed a commit to huizhilu/helix that referenced this pull request Aug 16, 2020
…e#1028)

The Abnormal States Resolver defines a generic interface to find and recover if the partition has any abnormal current states. For example,
- double masters
- application data out of sync
The interface shall be implemented according to the requirement.

The resolver is applied in the rebalance process according to the corresponding cluster config item. For example,
"ABNORMAL_STATES_RESOLVER_MAP" : {
 "MASTERSLAVE" : "org.apache.helix.api.rebalancer.constraint.MasterSlaveAbnormalStateReslovler"
}
The default behavior without any configuration is not doing any recovery work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants