ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-3670) Hosts should roll up host_components status into its status
Date Fri, 01 Nov 2013 20:28:17 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-3670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13811623#comment-13811623
] 

Tom Beerbower commented on AMBARI-3670:
---------------------------------------


Calculation for host_status:

 * *host_state* - the state of the host (INIT, WAITING_FOR_HOST_STATUS_UPDATES, HEALTHY, HEARTBEAT_LOST,
UNHEALTHY)
 * *host_status* - the status of the host, accounting for owned host component state (UNKNOWN,HEALTHY,
ALERT, UNHEALTHY)
 * *master_count* - the total number of master components on this host
 * *masters_live* - the number of live master components on this host
 * *slave_count* - the total number of slave components on this host
 * *slaves_live* - the number of live slave components on this host

{code}
if (host_state == HEARTBEAT_LOST)
    host_status = UNKNOWN
else if (master_count == masters_live && slave_count == slaves_live)
    host_status = HEALTHY 
else if (master_count > 0 && masters_live < master_count )
    host_status = UNHEALTHY
else 
    host_status = ALERT
{code}


> Hosts should roll up host_components status into its status
> -----------------------------------------------------------
>
>                 Key: AMBARI-3670
>                 URL: https://issues.apache.org/jira/browse/AMBARI-3670
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Tom Beerbower
>            Assignee: Tom Beerbower
>
> Ambari UI loads all host_components to calculate the state of each host (red=host_component
stopped, etc.). Since this is not scaling, we want to request the Host's {{Hosts/host_status}}
to accurately reflect the status of host_components for that host.
> Call made by UI is
> {code}
> http://server:8080/api/v1/clusters/ga/hosts?fields=Hosts/host_name,Hosts/public_host_name,Hosts/disk_info,Hosts/cpu_count,Hosts/total_mem,Hosts/host_status,Hosts/last_heartbeat_time,Hosts/os_arch,Hosts/os_type,Hosts/ip,host_components,metrics/disk,metrics/load/load_one
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message