Created on 12-28-2016 07:23 PM - edited 08-17-2019 06:32 AM
ISSUE: While upgrading HDP, Ranger service failed. Below was the error -
Failed to apply patch 020-datamask-policy.sql” with error “Not able to drop table ‘x_datamast_type_’def” Foreign constraints fails Error Code 1217
ERROR:
ROOT CAUSE: Issue was with foreign_key_checks
RESOLUTION:
“SET foreign_key_checks = 0;” in mysql ranger DB and dropped the table manually and re-created and again “SET foreign_key_checks = 1;”