@classmethod
    def _impala_validation(cls, cluster):
        ics_count = cls._get_inst_count(cluster, 'IMPALA_CATALOGSERVER')
        iss_count = cls._get_inst_count(cluster, 'IMPALA_STATESTORE')
        id_count = cls._get_inst_count(cluster, 'IMPALAD')
        dn_count = cls._get_inst_count(cluster, 'HDFS_DATANODE')
        hms_count = cls._get_inst_count(cluster, 'HIVE_METASTORE')

        if ics_count > 1:
            raise ex.InvalidComponentCountException('IMPALA_CATALOGSERVER',
                                                    _('0 or 1'), ics_count)
        if iss_count > 1:
            raise ex.InvalidComponentCountException('IMPALA_STATESTORE',
                                                    _('0 or 1'), iss_count)
        if ics_count == 1:
            datanode_ng = u.get_node_groups(cluster, "HDFS_DATANODE")
            impalad_ng = u.get_node_groups(cluster, "IMPALAD")
            datanodes = set(ng.id for ng in datanode_ng)
            impalads = set(ng.id for ng in impalad_ng)

            if datanodes != impalads:
                raise ex.InvalidClusterTopology(
                    _("IMPALAD must be installed on every HDFS_DATANODE"))

            if iss_count != 1:
                raise ex.RequiredServiceMissingException(
                    'IMPALA_STATESTORE', required_by='IMPALA')
            if id_count < 1:
                raise ex.RequiredServiceMissingException(
                    'IMPALAD', required_by='IMPALA')
            if dn_count < 1:
                raise ex.RequiredServiceMissingException(
                    'HDFS_DATANODE', required_by='IMPALA')
            if 1 < hms_count:
                raise ex.RequiredServiceMissingException(
                    'HIVE_METASTORE', required_by='IMPALA')
dataset/ETHPy150Open openstack/sahara/sahara/plugins/cdh/v5_3_0/validation.py/ValidatorV530._impala_validation/swapped operands of `<`