I verify there is a limit on lenght of username of HUE database ( 30 character ).
In CDH 5.5 I see that in sqlite I could have more than 30 characters ( it's very strange, I think it's a bug ) but when you will migrate to mysql database it's not possible to load of the json file because it will give you a lot of errors.
The problem is considerable if you will integrate HUE with LDAP because the username is :
So it's easy with a username = <firstname>.<lastname> and a domain with <subdomain>.<domain>.<[com,uk,us,it,es,..]> to have more than 30 character .
I think it could be larger ( 100 character ) to be "safe".