Curtis Granderson has announced his retirement after a 16-year career.