-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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-24425 Run hbck_chore_run and catalogjanitor_run on draw of 'HBC… #1771
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. branch-2 only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left few comments. Looks good.
<% | ||
final String cacheParameterValue = request.getParameter("cache"); | ||
boolean cache = Boolean.valueOf(cacheParameterValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Since we need boolean
, we can directly use: Boolean.parseBoolean(cacheParameterValue)
if (!cache) { | ||
// Run the two reporters inline w/ drawing of the page. If exception, will show in page draw. | ||
master.getMasterRpcServices().runHbckChore(null, null); | ||
master.getMasterRpcServices().runCatalogScan(null, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MasterRpcServices throw ServiceException
for both runHbckChore
and runCatalogScan
. Maybe we can handle it and print some nice error message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Was thinking about it. Though the rare SE not the end of the world. Added something at your prompting.... it looks like this when generated...
if (!Boolean.parseBoolean(cacheParameterValue)) {
// Run the two reporters inline w/ drawing of the page. If exception, will show in page draw.
try {
master.getMasterRpcServices().runHbckChore(null, null);
} catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se) {
out.write("Failed generating a new hbck_chore report; using cache; try again or run hbck_chore_run in the shell: " + se.getMessage() + "\n");
}
try {
master.getMasterRpcServices().runCatalogScan(null, null);
} catch (org.apache.hbase.thirdparty.com.google.protobuf.ServiceException se) {
out.write("Failed generating a new catalogjanitor report; using cache; try again or run catalogjanitor_run in the shell: " + se.getMessage() + "\n");
}
}
@@ -37,9 +37,17 @@ | |||
<%@ page import="org.apache.hadoop.hbase.util.Pair" %> | |||
<%@ page import="org.apache.hadoop.hbase.master.CatalogJanitor" %> | |||
<%@ page import="org.apache.hadoop.hbase.master.CatalogJanitor.Report" %> | |||
<%@ page import="org.apache.hadoop.hbase.util.Threads" %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not being used it seems.
Looks like a clean apply to master and branch-2.3 👍 |
Address @virajjasani suggestions. @HorizonNet I pushed against branch-2 since that is what I know and its stable.... will forward port when all is good. Thanks for the reviews. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…K Report' page (#1771) Signed-off-by: clarax Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com> Signed-off-by: Huaxiang Sun <huaxiangsun@apache.com>
…K Report' page (#1771) Signed-off-by: clarax Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com> Signed-off-by: Huaxiang Sun <huaxiangsun@apache.com>
…K Report' page (apache#1771) Signed-off-by: clarax Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Jan Hentschel <jan.hentschel@ultratendency.com> Signed-off-by: Huaxiang Sun <huaxiangsun@apache.com>
…K Report' page