it reads it from kerberos ticket and using dns. did you make the correct registry edits on your windows client running spark so that java can read the ticket?
mainly On workstations make the following registry change
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters
reg dword allowtgtsessionkey value 1