HADOOP-12559. KMS connection failures should trigger TGT renewal. Contributed by Zhe Zhang.

Conflicts:
	hadoop-common-project/hadoop-common/CHANGES.txt
This commit is contained in:
Xiaoyu Yao 2015-12-28 10:41:26 -08:00 committed by Zhe Zhang
parent f0c278469b
commit c6f68a7f98

View File

@ -474,6 +474,8 @@ private HttpURLConnection createConnection(final URL url, String method)
UserGroupInformation.AuthenticationMethod.PROXY) UserGroupInformation.AuthenticationMethod.PROXY)
? currentUgi.getShortUserName() : null; ? currentUgi.getShortUserName() : null;
// check and renew TGT to handle potential expiration
actualUgi.checkTGTAndReloginFromKeytab();
// creating the HTTP connection using the current UGI at constructor time // creating the HTTP connection using the current UGI at constructor time
conn = actualUgi.doAs(new PrivilegedExceptionAction<HttpURLConnection>() { conn = actualUgi.doAs(new PrivilegedExceptionAction<HttpURLConnection>() {
@Override @Override