|
@@ -49,9 +49,6 @@ import com.google.common.annotations.VisibleForTesting;
|
|
|
public class URLConnectionFactory {
|
|
|
private static final Log LOG = LogFactory.getLog(URLConnectionFactory.class);
|
|
|
|
|
|
- /** SPNEGO authenticator */
|
|
|
- private static final KerberosUgiAuthenticator AUTH = new KerberosUgiAuthenticator();
|
|
|
-
|
|
|
/**
|
|
|
* Timeout for socket connects and reads
|
|
|
*/
|
|
@@ -161,8 +158,8 @@ public class URLConnectionFactory {
|
|
|
}
|
|
|
UserGroupInformation.getCurrentUser().checkTGTAndReloginFromKeytab();
|
|
|
final AuthenticatedURL.Token authToken = new AuthenticatedURL.Token();
|
|
|
- return new AuthenticatedURL(AUTH, connConfigurator).openConnection(url,
|
|
|
- authToken);
|
|
|
+ return new AuthenticatedURL(new KerberosUgiAuthenticator(),
|
|
|
+ connConfigurator).openConnection(url, authToken);
|
|
|
} else {
|
|
|
if (LOG.isDebugEnabled()) {
|
|
|
LOG.debug("open URL connection");
|