HADOOP-10678. Merging change r1602473 from trunk to branch-2.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1602474 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
15faf00a8b
commit
e58355f9aa
|
@ -208,6 +208,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
HADOOP-10686. Writables are not always configured.
|
HADOOP-10686. Writables are not always configured.
|
||||||
(Abraham Elmahrek via kasha)
|
(Abraham Elmahrek via kasha)
|
||||||
|
|
||||||
|
HADOOP-10678. SecurityUtil has unnecessary synchronization on collection
|
||||||
|
used for only tests. (Benoy Antony via cnauroth)
|
||||||
|
|
||||||
BREAKDOWN OF HADOOP-10514 SUBTASKS AND RELATED JIRAS
|
BREAKDOWN OF HADOOP-10514 SUBTASKS AND RELATED JIRAS
|
||||||
|
|
||||||
HADOOP-10520. Extended attributes definition and FileSystem APIs for
|
HADOOP-10520. Extended attributes definition and FileSystem APIs for
|
||||||
|
|
|
@ -289,14 +289,12 @@ public class SecurityUtil {
|
||||||
*/
|
*/
|
||||||
public static KerberosInfo
|
public static KerberosInfo
|
||||||
getKerberosInfo(Class<?> protocol, Configuration conf) {
|
getKerberosInfo(Class<?> protocol, Configuration conf) {
|
||||||
synchronized (testProviders) {
|
|
||||||
for(SecurityInfo provider: testProviders) {
|
for(SecurityInfo provider: testProviders) {
|
||||||
KerberosInfo result = provider.getKerberosInfo(protocol, conf);
|
KerberosInfo result = provider.getKerberosInfo(protocol, conf);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
synchronized (securityInfoProviders) {
|
synchronized (securityInfoProviders) {
|
||||||
for(SecurityInfo provider: securityInfoProviders) {
|
for(SecurityInfo provider: securityInfoProviders) {
|
||||||
|
@ -317,14 +315,12 @@ public class SecurityUtil {
|
||||||
* @return the TokenInfo or null if it has no KerberosInfo defined
|
* @return the TokenInfo or null if it has no KerberosInfo defined
|
||||||
*/
|
*/
|
||||||
public static TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
|
public static TokenInfo getTokenInfo(Class<?> protocol, Configuration conf) {
|
||||||
synchronized (testProviders) {
|
|
||||||
for(SecurityInfo provider: testProviders) {
|
for(SecurityInfo provider: testProviders) {
|
||||||
TokenInfo result = provider.getTokenInfo(protocol, conf);
|
TokenInfo result = provider.getTokenInfo(protocol, conf);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
synchronized (securityInfoProviders) {
|
synchronized (securityInfoProviders) {
|
||||||
for(SecurityInfo provider: securityInfoProviders) {
|
for(SecurityInfo provider: securityInfoProviders) {
|
||||||
|
|
Loading…
Reference in New Issue