MAPREDUCE-3639. Fixed TokenCache to work with absent FileSystem canonical service-names. (Siddharth Seth via vinodkv)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1229444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
428529b58f
commit
48150cddaf
|
@ -439,6 +439,9 @@ Release 0.23.1 - Unreleased
|
|||
MAPREDUCE-3616. Thread pool for launching containers in MR AM not
|
||||
expanding as expected. (vinodkv via sseth)
|
||||
|
||||
MAPREDUCE-3639. Fixed TokenCache to work with absent FileSystem canonical
|
||||
service-names. (Siddharth Seth via vinodkv)
|
||||
|
||||
Release 0.23.0 - 2011-11-01
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -172,10 +172,14 @@ public class TokenCache {
|
|||
@InterfaceAudience.Private
|
||||
public static Token<DelegationTokenIdentifier> getDelegationToken(
|
||||
Credentials credentials, String namenode) {
|
||||
//No fs specific tokens issues by this fs. It may however issue tokens
|
||||
// for other filesystems - which would be keyed by that filesystems name.
|
||||
if (namenode == null)
|
||||
return null;
|
||||
return (Token<DelegationTokenIdentifier>) credentials.getToken(new Text(
|
||||
namenode));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* load job token from a file
|
||||
* @param conf
|
||||
|
|
|
@ -130,7 +130,7 @@ public class TestTokenCache {
|
|||
private FileSystem setupMultiFs(final FileSystem singleFs,
|
||||
final String renewer, final Credentials credentials) throws Exception {
|
||||
FileSystem mockFs = mock(FileSystem.class);
|
||||
when(mockFs.getCanonicalServiceName()).thenReturn("multifs");
|
||||
when(mockFs.getCanonicalServiceName()).thenReturn(null);
|
||||
when(mockFs.getUri()).thenReturn(new URI("multifs:///"));
|
||||
|
||||
when(mockFs.getDelegationTokens(any(String.class))).thenThrow(
|
||||
|
|
Loading…
Reference in New Issue