You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Swapan Shridhar (JIRA)" <ji...@apache.org> on 2017/09/15 03:44:02 UTC

[jira] [Updated] (AMBARI-21963) Ambari-server gives database consistency error : ERROR: column hcs.service_name does not exis

     [ https://issues.apache.org/jira/browse/AMBARI-21963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Swapan Shridhar updated AMBARI-21963:
-------------------------------------
    Description: 
In DatabaseConsistencyCheckerHelper : There is a query that is executed to verify count of rows in *hostcomponentstate* and *hostcomponentdesiredstate*.

{code}
String GET_MERGED_TABLE_ROW_COUNT_QUERY = "select count FROM hostcomponentstate hcs " +
"JOIN hostcomponentdesiredstate hcds ON hcs.service_name=hcds.service_name AND hcs.component_name=hcds.component_name AND hcs.host_id=hcds.host_id";
{code}

With service group changes, *hostcomponentstate* and *hostcomponentdesiredstate* has replaced *service_name* with *service_id* and added a column for *service_group_id*.

*Fix:* Use *service_id*  and *service_group_id* in query.

> Ambari-server gives database consistency error : ERROR: column hcs.service_name does not exis
> ---------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-21963
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21963
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.5.1
>            Reporter: Swapan Shridhar
>            Assignee: Swapan Shridhar
>            Priority: Blocker
>             Fix For: 3.0.0
>
>
> In DatabaseConsistencyCheckerHelper : There is a query that is executed to verify count of rows in *hostcomponentstate* and *hostcomponentdesiredstate*.
> {code}
> String GET_MERGED_TABLE_ROW_COUNT_QUERY = "select count FROM hostcomponentstate hcs " +
> "JOIN hostcomponentdesiredstate hcds ON hcs.service_name=hcds.service_name AND hcs.component_name=hcds.component_name AND hcs.host_id=hcds.host_id";
> {code}
> With service group changes, *hostcomponentstate* and *hostcomponentdesiredstate* has replaced *service_name* with *service_id* and added a column for *service_group_id*.
> *Fix:* Use *service_id*  and *service_group_id* in query.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)