HADOOP-9305. Add support for running the Hadoop client on 64-bit AIX. Contributed by Aaron T. Myers.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1445884 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7bc6040ebb
commit
a3ddc8ef96
|
@ -360,6 +360,8 @@ Release 2.0.4-beta - UNRELEASED
|
||||||
|
|
||||||
HADOOP-9294. GetGroupsTestBase fails on Windows. (Chris Nauroth via suresh)
|
HADOOP-9294. GetGroupsTestBase fails on Windows. (Chris Nauroth via suresh)
|
||||||
|
|
||||||
|
HADOOP-9305. Add support for running the Hadoop client on 64-bit AIX. (atm)
|
||||||
|
|
||||||
Release 2.0.3-alpha - 2013-02-06
|
Release 2.0.3-alpha - 2013-02-06
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -316,7 +316,8 @@ public class UserGroupInformation {
|
||||||
return is64Bit ? "com.ibm.security.auth.module.Win64LoginModule"
|
return is64Bit ? "com.ibm.security.auth.module.Win64LoginModule"
|
||||||
: "com.ibm.security.auth.module.NTLoginModule";
|
: "com.ibm.security.auth.module.NTLoginModule";
|
||||||
} else if (aix) {
|
} else if (aix) {
|
||||||
return "com.ibm.security.auth.module.AIXLoginModule";
|
return is64Bit ? "com.ibm.security.auth.module.AIX64LoginModule"
|
||||||
|
: "com.ibm.security.auth.module.AIXLoginModule";
|
||||||
} else {
|
} else {
|
||||||
return "com.ibm.security.auth.module.LinuxLoginModule";
|
return "com.ibm.security.auth.module.LinuxLoginModule";
|
||||||
}
|
}
|
||||||
|
@ -331,24 +332,24 @@ public class UserGroupInformation {
|
||||||
private static Class<? extends Principal> getOsPrincipalClass() {
|
private static Class<? extends Principal> getOsPrincipalClass() {
|
||||||
ClassLoader cl = ClassLoader.getSystemClassLoader();
|
ClassLoader cl = ClassLoader.getSystemClassLoader();
|
||||||
try {
|
try {
|
||||||
|
String principalClass = null;
|
||||||
if (ibmJava) {
|
if (ibmJava) {
|
||||||
|
if (is64Bit) {
|
||||||
|
principalClass = "com.ibm.security.auth.UsernamePrincipal";
|
||||||
|
} else {
|
||||||
if (windows) {
|
if (windows) {
|
||||||
return (Class<? extends Principal>) (is64Bit
|
principalClass = "com.ibm.security.auth.NTUserPrincipal";
|
||||||
? cl.loadClass("com.ibm.security.auth.UsernamePrincipal")
|
|
||||||
: cl.loadClass("com.ibm.security.auth.NTUserPrincipal"));
|
|
||||||
} else if (aix) {
|
} else if (aix) {
|
||||||
return (Class<? extends Principal>)
|
principalClass = "com.ibm.security.auth.AIXPrincipal";
|
||||||
cl.loadClass("com.ibm.security.auth.AIXPrincipal");
|
|
||||||
} else {
|
} else {
|
||||||
return (Class<? extends Principal>) (is64Bit
|
principalClass = "com.ibm.security.auth.LinuxPrincipal";
|
||||||
? cl.loadClass("com.ibm.security.auth.UsernamePrincipal")
|
}
|
||||||
: cl.loadClass("com.ibm.security.auth.LinuxPrincipal"));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return (Class<? extends Principal>) (windows
|
principalClass = windows ? "com.sun.security.auth.NTUserPrincipal"
|
||||||
? cl.loadClass("com.sun.security.auth.NTUserPrincipal")
|
: "com.sun.security.auth.UnixPrincipal";
|
||||||
: cl.loadClass("com.sun.security.auth.UnixPrincipal"));
|
|
||||||
}
|
}
|
||||||
|
return (Class<? extends Principal>) cl.loadClass(principalClass);
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
LOG.error("Unable to find JAAS classes:" + e.getMessage());
|
LOG.error("Unable to find JAAS classes:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue