From 42d071ab6f7cdba1d021cf563879996685f82634 Mon Sep 17 00:00:00 2001 From: Alejandro Abdelnur Date: Thu, 2 Aug 2012 22:10:51 +0000 Subject: [PATCH] HDFS-3756. DelegationTokenFetcher creates 2 HTTP connections, the second one not properly configured. (tucu) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1368733 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 346c9820ac..c131d6ea8f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -551,6 +551,9 @@ Branch-2 ( Unreleased changes ) HDFS-3738. TestDFSClientRetries#testFailuresArePerOperation sets incorrect timeout config. (atm) + HDFS-3756. DelegationTokenFetcher creates 2 HTTP connections, the second + one not properly configured. (tucu) + BREAKDOWN OF HDFS-3042 SUBTASKS HDFS-2185. HDFS portion of ZK-based FailoverController (todd) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java index 63aa6b2064..e0935d475c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DelegationTokenFetcher.java @@ -259,7 +259,6 @@ static public long renewDelegationToken(String nnAddr, try { URL url = new URL(buf.toString()); connection = (HttpURLConnection) SecurityUtil.openSecureHttpConnection(url); - connection = (HttpURLConnection)URLUtils.openConnection(url); if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) { throw new IOException("Error renewing token: " + connection.getResponseMessage());