There is only one problem with hive distict and count operating reducer
Select count (distinct *) from table
Writing like this will generate a job with only one reducer execution, which can be changed to the following:
Select count (*) from (
Select distinct * from table) t
In this way, two job can be generated, and multiple reducer can be executed, thus improving efficiency.