Found this while working on
HBASE-18946. In branch-1.4 when ever we do enable table we try retain assignment.
But in branch-2 and trunk the EnableTableProcedure tries to get the location from the existing regionNode. It always returns null because while doing region CLOSE while disabling a table, the regionNode's 'regionLocation' is made NULL but the 'lastHost' is actually having the servername where the region was hosted. But on trying assignment again we try to see what was the last RegionLocation and not the 'lastHost' and we go ahead with new assignment.
On region CLOSE while disable table
So further code in AssignProcedure
Tries to do retainAssignment but fails because lastRegionLocation is always null.