@classmethod
    def _sqoop_validation(cls, cluster):

        s2s_count = cls._get_inst_count(cluster, 'SQOOP_SERVER')
        dn_count = cls._get_inst_count(cluster, 'HDFS_DATANODE')
        hs_count = cls._get_inst_count(cluster, 'YARN_JOBHISTORY')
        nm_count = cls._get_inst_count(cluster, 'YARN_NODEMANAGER')

        if s2s_count > 1:
            raise ex.InvalidComponentCountException(
                'SQOOP_SERVER', _('0 or 1'), s2s_count)
        if s2s_count == 1:
            if dn_count < 1:
                raise ex.RequiredServiceMissingException(
                    'HDFS_DATANODE', required_by='SQOOP_SERVER')
            if nm_count < 1:
                raise ex.RequiredServiceMissingException(
                    'YARN_NODEMANAGER', required_by='SQOOP_SERVER')
            if hs_count != 1:
                raise ex.RequiredServiceMissingException(
                    'YARN_JOBHISTORY', required_by='SQOOP_SERVER')
dataset/ETHPy150Open openstack/sahara/sahara/plugins/cdh/v5_3_0/validation.py/ValidatorV530._sqoop_validation/original