[
https://issues.apache.org/jira/browse/HBASE-16399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15453955#comment-15453955
]
Andrew Purtell commented on HBASE-16399:
----------------------------------------
Mostly looks good [~vishk]
Let's improve this message. If we are logging a write failure at ERROR log
level, then let's just say it is a write failure and not use arcane language
about "updating write failure list" (also inappropriately in all caps). If this
is meant to be an internal message, then ERROR level is not appropriate, more
like DEBUG.
{code}
+ LOG.error(String.format("Updating Write Failure List from region:%s on
region server:%s",
+ region.getRegionNameAsString(), serverName));
{code}
Please use INFO everywhere or ERROR everywhere, don't mix log levels like this:
{code}
+ Map<String,String> readFailures = sink.getReadFailures();
+ if(readFailures != null && readFailures.size() > 0){
+ LOG.info("==== Read Canary Failure Summary ===");
+ LOG.info("Region \t Server Name");
+ for(Map.Entry<String,String> e : readFailures.entrySet()) {
+ LOG.error(e.getKey() + "\t" + e.getValue());
+ }
+ }
+
+ Map<String,String> writeFailures = sink.getWriteFailures();
+ if(writeFailures != null && writeFailures.size() > 0){
+ LOG.info("==== Write Canary Failure Summary ===");
+ LOG.info("Region \t Server Name");
+ for(Map.Entry<String,String> e : writeFailures.entrySet()) {
+ LOG.error(e.getKey() + "\t" + e.getValue());
+ }
{code}
Also, since this change is described as an API - presumably to be used by code
that extends the tool - is the added logging even necessary? Does it add high
value output or noise in the logs? Somewhere in between ? (smile)
> Provide an API to get list of failed regions and servername in Canary
> ---------------------------------------------------------------------
>
> Key: HBASE-16399
> URL: https://issues.apache.org/jira/browse/HBASE-16399
> Project: HBase
> Issue Type: Improvement
> Components: canary
> Affects Versions: 1.3.1, 0.98.21
> Reporter: Vishal Khandelwal
> Assignee: Vishal Khandelwal
> Fix For: 1.3.1, 0.98.23
>
> Attachments: HBASE-16399.0.98.00.patch, HBASE-16399.0.98.01.patch,
> HBASE-16399.00.patch, HBASE-16399.01.patch, HBASE-16399.02.patch,
> HBASE-16399.branch-1.00.patch, HBASE-16399.branch-1.01.patch,
> HBASE-16399.branch-1.02.patch
>
>
> At present HBase Canary tool only prints the failures as part of logs. It
> does not provide an API to get the list or summarizes it so caller can take
> action on the failed host. This Jira would additional API so caller can get
> read or write canary failures.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)