hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Drob (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18609) Apply ClusterStatus#getClusterStatus(EnumSet<Option>) in code base
Date Wed, 13 Sep 2017 16:38:01 GMT

    [ https://issues.apache.org/jira/browse/HBASE-18609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16164917#comment-16164917

Mike Drob commented on HBASE-18609:

Would it make sense to have ClusterStatus return some kind of error code for statuses that
it didn't fetch?

Visually inspecting the code, I can see this kind of error occurring in client logic:

ClusterStatus status = getClusterStatus(EnumSet.of(Option.LIVE_SERVERS, Option.BACKUP_MASTERS));
ServerName master = status.getBackupMasters();

Actually, this example wouldn't compile because of return types, but if we're the point is
if we're switching what we get and ask for the wrong thing it will probably fail silently
and in strange ways. May be better to explicitly throw a StatusNotAvailableException or something
of the like?

> Apply ClusterStatus#getClusterStatus(EnumSet<Option>) in code base
> ------------------------------------------------------------------
>                 Key: HBASE-18609
>                 URL: https://issues.apache.org/jira/browse/HBASE-18609
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Chia-Ping Tsai
>            Assignee: Reid Chan
>             Fix For: 2.0.0
>         Attachments: HBASE-18609.master.001.patch, HBASE-18609.master.002.patch
> HBASE-15511 enable us to get the cluster status by scope, and after refactoring in HBASE-18621.
We should apply it in code base so as to prevent the useless information.

This message was sent by Atlassian JIRA

View raw message