Description
Impala calls gethostname() to get the local system's name which is used as a part of the kerberos principal. This usually works fine under most settings, however, this is not guaranteed to return the FQDN of the host under certain settings (Eg: possibly while using a DNS GSLB).
Impala should attempt to get the FQDN first which can be obtained by using getaddrinfo(), and fallback to gethostname() otherwise. This is the behavior of Hadoop, which we should try to match as closely as possible:
https://github.com/apache/hadoop/blob/master/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java#L169