Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-24361 Make RESTApiClusterManager more resilient #1701

Conversation

ndimiduk
Copy link
Member

  • sometimes API calls return with null/empty response bodies. thus,
    wrap all API calls in a retry loop.
  • calls that submit work in the form of "commands" now retrieve the
    commandId from successful command submission, and track completion
    of that command before returning control to calling context.
  • model CM's process state and use that model to guide state
    transitions more intelligently. this guards against, for example,
    the start command failing with an error message like "Role must be
    stopped".
  • improvements to logging levels, avoid spamming logs with the
    side-effects of retries at this and higher contexts.
  • include references to API documentation, such as it is.

* sometimes API calls return with null/empty response bodies. thus,
  wrap all API calls in a retry loop.
* calls that submit work in the form of "commands" now retrieve the
  commandId from successful command submission, and track completion
  of that command before returning control to calling context.
* model CM's process state and use that model to guide state
  transitions more intelligently. this guards against, for example,
  the start command failing with an error message like "Role must be
  stopped".
* improvements to logging levels, avoid spamming logs with the
  side-effects of retries at this and higher contexts.
* include references to API documentation, such as it is.
Copy link
Contributor

@saintstack saintstack left a comment

Choose a reason for hiding this comment

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

Skimmed. +1 if it works.

// retaining the "Started" state but with the process marked as "unhealthy".
// Instead of blindly issuing the START command, first send a STOP command
// to ensure the START will be accepted.
LOG.debug("Performing start of {} on {}:{}", service, hostname, port);
Copy link
Contributor

Choose a reason for hiding this comment

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

Good

+ " {} state. Restarting. {}, {}:{}", currentState, service, hostname, port);
performClusterManagerCommand(service, hostname, RoleCommand.RESTART);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Man

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 41s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2.3 Compile Tests _
+1 💚 mvninstall 3m 42s branch-2.3 passed
+1 💚 compile 0m 27s branch-2.3 passed
+1 💚 shadedjars 4m 35s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 15s branch-2.3 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 15s the patch passed
+1 💚 compile 0m 25s the patch passed
+1 💚 javac 0m 25s the patch passed
+1 💚 shadedjars 4m 36s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 13s the patch passed
_ Other Tests _
+1 💚 unit 0m 55s hbase-it in the patch passed.
20m 20s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1701/1/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #1701
Optional Tests javac javadoc unit shadedjars compile
uname Linux 333e6da5df72 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.3 / 8f245aa
Default Java 1.8.0_232
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1701/1/testReport/
Max. process+thread count 718 (vs. ulimit of 12500)
modules C: hbase-it U: hbase-it
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1701/1/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 39s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ branch-2.3 Compile Tests _
+1 💚 mvninstall 4m 8s branch-2.3 passed
+1 💚 compile 0m 29s branch-2.3 passed
+1 💚 shadedjars 5m 29s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 16s branch-2.3 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 57s the patch passed
+1 💚 compile 0m 29s the patch passed
+1 💚 javac 0m 29s the patch passed
+1 💚 shadedjars 5m 28s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 14s the patch passed
_ Other Tests _
+1 💚 unit 0m 52s hbase-it in the patch passed.
23m 22s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1701/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #1701
Optional Tests javac javadoc unit shadedjars compile
uname Linux 35af1ac26056 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.3 / 8f245aa
Default Java 2020-01-14
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1701/1/testReport/
Max. process+thread count 724 (vs. ulimit of 12500)
modules C: hbase-it U: hbase-it
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1701/1/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 41s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ branch-2.3 Compile Tests _
+1 💚 mvninstall 3m 39s branch-2.3 passed
+1 💚 checkstyle 0m 19s branch-2.3 passed
+1 💚 spotbugs 0m 0s branch-2.3 passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 14s the patch passed
+1 💚 checkstyle 0m 16s hbase-it: The patch generated 0 new + 1 unchanged - 1 fixed = 1 total (was 2)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 17m 20s Patch does not cause any errors with Hadoop 2.10.0 or 3.1.2 3.2.1.
+1 💚 spotbugs 0m 0s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 15s The patch does not generate ASF License warnings.
32m 59s
Subsystem Report/Notes
Docker Client=19.03.8 Server=19.03.8 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1701/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #1701
Optional Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle
uname Linux cc6482bce8ba 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2.3 / 8f245aa
Max. process+thread count 78 (vs. ulimit of 12500)
modules C: hbase-it U: hbase-it
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1701/1/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@ndimiduk ndimiduk merged commit cf9e337 into apache:branch-2.3 May 19, 2020
@ndimiduk ndimiduk deleted the 24361-RESTApiClusterManager-resiliency-branch-2.3 branch May 19, 2020 16:44
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request May 19, 2020
* sometimes API calls return with null/empty response bodies. thus,
  wrap all API calls in a retry loop.
* calls that submit work in the form of "commands" now retrieve the
  commandId from successful command submission, and track completion
  of that command before returning control to calling context.
* model CM's process state and use that model to guide state
  transitions more intelligently. this guards against, for example,
  the start command failing with an error message like "Role must be
  stopped".
* improvements to logging levels, avoid spamming logs with the
  side-effects of retries at this and higher contexts.
* include references to API documentation, such as it is.

Signed-off-by: stack <stack@apache.org>
ndimiduk added a commit that referenced this pull request May 19, 2020
* sometimes API calls return with null/empty response bodies. thus,
  wrap all API calls in a retry loop.
* calls that submit work in the form of "commands" now retrieve the
  commandId from successful command submission, and track completion
  of that command before returning control to calling context.
* model CM's process state and use that model to guide state
  transitions more intelligently. this guards against, for example,
  the start command failing with an error message like "Role must be
  stopped".
* improvements to logging levels, avoid spamming logs with the
  side-effects of retries at this and higher contexts.
* include references to API documentation, such as it is.

Signed-off-by: stack <stack@apache.org>
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request May 19, 2020
* sometimes API calls return with null/empty response bodies. thus,
  wrap all API calls in a retry loop.
* calls that submit work in the form of "commands" now retrieve the
  commandId from successful command submission, and track completion
  of that command before returning control to calling context.
* model CM's process state and use that model to guide state
  transitions more intelligently. this guards against, for example,
  the start command failing with an error message like "Role must be
  stopped".
* improvements to logging levels, avoid spamming logs with the
  side-effects of retries at this and higher contexts.
* include references to API documentation, such as it is.

Signed-off-by: stack <stack@apache.org>
ndimiduk added a commit that referenced this pull request May 19, 2020
* sometimes API calls return with null/empty response bodies. thus,
  wrap all API calls in a retry loop.
* calls that submit work in the form of "commands" now retrieve the
  commandId from successful command submission, and track completion
  of that command before returning control to calling context.
* model CM's process state and use that model to guide state
  transitions more intelligently. this guards against, for example,
  the start command failing with an error message like "Role must be
  stopped".
* improvements to logging levels, avoid spamming logs with the
  side-effects of retries at this and higher contexts.
* include references to API documentation, such as it is.

Signed-off-by: stack <stack@apache.org>
clarax pushed a commit to clarax/hbase that referenced this pull request Nov 15, 2020
* sometimes API calls return with null/empty response bodies. thus,
  wrap all API calls in a retry loop.
* calls that submit work in the form of "commands" now retrieve the
  commandId from successful command submission, and track completion
  of that command before returning control to calling context.
* model CM's process state and use that model to guide state
  transitions more intelligently. this guards against, for example,
  the start command failing with an error message like "Role must be
  stopped".
* improvements to logging levels, avoid spamming logs with the
  side-effects of retries at this and higher contexts.
* include references to API documentation, such as it is.

Signed-off-by: stack <stack@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants