svn commit: r1339540 - /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
Author: atm Date: Thu May 17 10:23:18 2012 New Revision: 1339540 URL: http://svn.apache.org/viewvc?rev=1339540&view=rev Log: HDFS-3433. GetImageServlet should allow administrative requestors when security is enabled. Contributed by Aaron T. Myers. Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java?rev=1339540&r1=1339539&r2=1339540&view=diff == --- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java Thu May 17 10:23:18 2012 @@ -96,7 +96,7 @@ public class HttpServer implements Filte // The ServletContext attribute where the daemon Configuration // gets stored. public static final String CONF_CONTEXT_ATTRIBUTE = "hadoop.conf"; - static final String ADMINS_ACL = "admins.acl"; + public static final String ADMINS_ACL = "admins.acl"; public static final String SPNEGO_FILTER = "SpnegoFilter"; public static final String BIND_ADDRESS = "bind.address"; @@ -792,7 +792,7 @@ public class HttpServer implements Filte * * @param servletContext * @param request - * @param response + * @param response used to send the error response if user does not have admin access. * @return true if admin-authorized, false otherwise * @throws IOException */ @@ -814,18 +814,33 @@ public class HttpServer implements Filte "authorized to access this page."); return false; } + +if (servletContext.getAttribute(ADMINS_ACL) != null && +!userHasAdministratorAccess(servletContext, remoteUser)) { + response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "User " + + remoteUser + " is unauthorized to access this page."); + return false; +} + +return true; + } + + /** + * Get the admin ACLs from the given ServletContext and check if the given + * user is in the ACL. + * + * @param servletContext the context containing the admin ACL. + * @param remoteUser the remote user to check for. + * @return true if the user is present in the ACL, false if no ACL is set or + * the user is not present + */ + public static boolean userHasAdministratorAccess(ServletContext servletContext, + String remoteUser) { AccessControlList adminsAcl = (AccessControlList) servletContext .getAttribute(ADMINS_ACL); UserGroupInformation remoteUserUGI = UserGroupInformation.createRemoteUser(remoteUser); -if (adminsAcl != null) { - if (!adminsAcl.isUserAllowed(remoteUserUGI)) { -response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "User " -+ remoteUser + " is unauthorized to access this page."); -return false; - } -} -return true; +return adminsAcl != null && adminsAcl.isUserAllowed(remoteUserUGI); } /**
svn commit: r1339543 - /hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java
Author: atm Date: Thu May 17 10:28:15 2012 New Revision: 1339543 URL: http://svn.apache.org/viewvc?rev=1339543&view=rev Log: HDFS-3433. GetImageServlet should allow administrative requestors when security is enabled. Contributed by Aaron T. Myers. Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java?rev=1339543&r1=1339542&r2=1339543&view=diff == --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java Thu May 17 10:28:15 2012 @@ -95,7 +95,7 @@ public class HttpServer implements Filte // The ServletContext attribute where the daemon Configuration // gets stored. public static final String CONF_CONTEXT_ATTRIBUTE = "hadoop.conf"; - static final String ADMINS_ACL = "admins.acl"; + public static final String ADMINS_ACL = "admins.acl"; public static final String SPNEGO_FILTER = "SpnegoFilter"; public static final String BIND_ADDRESS = "bind.address"; @@ -744,7 +744,7 @@ public class HttpServer implements Filte * * @param servletContext * @param request - * @param response + * @param response used to send the error response if user does not have admin access. * @return true if admin-authorized, false otherwise * @throws IOException */ @@ -766,18 +766,33 @@ public class HttpServer implements Filte "authorized to access this page."); return false; } + +if (servletContext.getAttribute(ADMINS_ACL) != null && +!userHasAdministratorAccess(servletContext, remoteUser)) { + response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "User " + + remoteUser + " is unauthorized to access this page."); + return false; +} + +return true; + } + + /** + * Get the admin ACLs from the given ServletContext and check if the given + * user is in the ACL. + * + * @param servletContext the context containing the admin ACL. + * @param remoteUser the remote user to check for. + * @return true if the user is present in the ACL, false if no ACL is set or + * the user is not present + */ + public static boolean userHasAdministratorAccess(ServletContext servletContext, + String remoteUser) { AccessControlList adminsAcl = (AccessControlList) servletContext .getAttribute(ADMINS_ACL); UserGroupInformation remoteUserUGI = UserGroupInformation.createRemoteUser(remoteUser); -if (adminsAcl != null) { - if (!adminsAcl.isUserAllowed(remoteUserUGI)) { -response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "User " -+ remoteUser + " is unauthorized to access this page."); -return false; - } -} -return true; +return adminsAcl != null && adminsAcl.isUserAllowed(remoteUserUGI); } /**
svn commit: r1339613 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt src/test/java/org/apache/hadoop/conf/empty-configuration.xml
Author: harsh Date: Thu May 17 14:20:07 2012 New Revision: 1339613 URL: http://svn.apache.org/viewvc?rev=1339613&view=rev Log: HADOOP-8360. empty-configuration.xml fails xml validation. Contributed by Radim Kolar. (harsh) Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/empty-configuration.xml Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1339613&r1=1339612&r2=1339613&view=diff == --- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Thu May 17 14:20:07 2012 @@ -67,6 +67,9 @@ Trunk (unreleased changes) HADOOP-8297. Writable javadocs don't carry default constructor (harsh) +HADOOP-8360. empty-configuration.xml fails xml validation +(Radim Kolar via harsh) + BUG FIXES HADOOP-8177. MBeans shouldn't try to register when it fails to create MBeanName. Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/empty-configuration.xml URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/empty-configuration.xml?rev=1339613&r1=1339612&r2=1339613&view=diff == --- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/empty-configuration.xml (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/empty-configuration.xml Thu May 17 14:20:07 2012 @@ -1,3 +1,4 @@ + -
svn commit: r1339629 - in /hadoop/common/trunk: hadoop-project/ hadoop-tools/ hadoop-tools/hadoop-gridmix/ hadoop-tools/hadoop-gridmix/src/ hadoop-tools/hadoop-gridmix/src/main/ hadoop-tools/hadoop-gr
Author: tgraves Date: Thu May 17 15:06:33 2012 New Revision: 1339629 URL: http://svn.apache.org/viewvc?rev=1339629&view=rev Log: MAPREDUCE-3543. Mavenize Gridmix. (tgraves) Added: hadoop/common/trunk/hadoop-tools/hadoop-gridmix/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/pom.xml hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/main/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/main/java/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/main/java/org/ - copied from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/java/org/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/tools/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/ hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/DebugJobFactory.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/DebugJobFactory.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/DebugJobProducer.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/DebugJobProducer.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/GridmixTestUtils.java - copied, changed from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/GridmixTestUtils.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestCompressionEmulationUtils.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestCompressionEmulationUtils.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestFilePool.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestFilePool.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestFileQueue.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestFileQueue.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestGridmixMemoryEmulation.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestGridmixMemoryEmulation.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestGridmixRecord.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestGridmixRecord.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestGridmixSummary.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestGridmixSummary.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestHighRamJob.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestHighRamJob.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestPseudoLocalFs.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestPseudoLocalFs.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestRandomAlgorithm.java - copied unchanged from r1339618, hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestRandomAlgorithm.java hadoop/common/trunk/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestRandomTextDataGenerator.java - cop
svn commit: r1339652 - in /hadoop/common/branches/branch-2: hadoop-project/ hadoop-tools/ hadoop-tools/hadoop-gridmix/ hadoop-tools/hadoop-gridmix/src/ hadoop-tools/hadoop-gridmix/src/main/ hadoop-too
Author: tgraves Date: Thu May 17 15:31:19 2012 New Revision: 1339652 URL: http://svn.apache.org/viewvc?rev=1339652&view=rev Log: MAPREDUCE-3543. Mavenize Gridmix. (tgraves) Added: hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/pom.xml hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/ - copied from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/java/org/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/tools/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/ hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/DebugJobFactory.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/DebugJobFactory.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/DebugJobProducer.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/DebugJobProducer.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/GridmixTestUtils.java - copied, changed from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/GridmixTestUtils.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestCompressionEmulationUtils.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestCompressionEmulationUtils.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestFilePool.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestFilePool.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestFileQueue.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestFileQueue.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestGridmixMemoryEmulation.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestGridmixMemoryEmulation.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestGridmixRecord.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestGridmixRecord.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestGridmixSummary.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestGridmixSummary.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestHighRamJob.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestHighRamJob.java hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/test/java/org/apache/hadoop/mapred/gridmix/TestPseudoLocalFs.java - copied unchanged from r1339634, hadoop/common/branches/branch-2/hadoop-mapreduce-project/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/TestPseudoLocalFs.
svn commit: r1339657 - in /hadoop/common/branches/branch-0.23: hadoop-project/ hadoop-tools/ hadoop-tools/hadoop-gridmix/ hadoop-tools/hadoop-gridmix/src/ hadoop-tools/hadoop-gridmix/src/main/ hadoop-
Author: tgraves Date: Thu May 17 15:40:42 2012 New Revision: 1339657 URL: http://svn.apache.org/viewvc?rev=1339657&view=rev Log: merge -r 1339651:1339652 from branch-2. FIXES: MAPREDUCE-3543 Added: hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/ - copied from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/ hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/pom.xml - copied, changed from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/pom.xml hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/ - copied from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/ hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/ - copied from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/ hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/ - copied from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/ hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/ - copied from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/ hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/ - copied from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/ hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/ - copied from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/ hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/ - copied from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/ hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/ - copied from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/ hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/AvgRecordFactory.java - copied unchanged from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/AvgRecordFactory.java hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/ClusterSummarizer.java - copied unchanged from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/ClusterSummarizer.java hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/CompressionEmulationUtil.java - copied unchanged from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/CompressionEmulationUtil.java hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/DistributedCacheEmulator.java - copied unchanged from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/DistributedCacheEmulator.java hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/EchoUserResolver.java - copied unchanged from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/EchoUserResolver.java hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/ExecutionSummarizer.java - copied unchanged from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/ExecutionSummarizer.java hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/FilePool.java - copied unchanged from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/FilePool.java hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/FileQueue.java - copied unchanged from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/FileQueue.java hadoop/common/branches/branch-0.23/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/GenerateData.java - copied unchanged from r1339652, hadoop/common/branches/branch-2/hadoop-tools/hadoop-gridmix/src/main/java/org/apache/hadoop/mapred/gridmix/GenerateData.java hadoop/common/branches/b
svn commit: r1339906 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt src/main/conf/hadoop-env.sh
Author: eli Date: Thu May 17 22:47:41 2012 New Revision: 1339906 URL: http://svn.apache.org/viewvc?rev=1339906&view=rev Log: HADOOP-8287. etc/hadoop is missing hadoop-env.sh. Contributed by Eli Collins Added: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1339906&r1=1339905&r2=1339906&view=diff == --- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Thu May 17 22:47:41 2012 @@ -181,6 +181,8 @@ Release 2.0.1-alpha - UNRELEASED HADOOP-8406. CompressionCodecFactory.CODEC_PROVIDERS iteration is thread-unsafe (todd) +HADOOP-8287. etc/hadoop is missing hadoop-env.sh (eli) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES Added: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh?rev=1339906&view=auto == --- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh (added) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh Thu May 17 22:47:41 2012 @@ -0,0 +1,74 @@ +# Copyright 2011 The Apache Software Foundation +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Set Hadoop-specific environment variables here. + +# The only required environment variable is JAVA_HOME. All others are +# optional. When running a distributed configuration it is best to +# set JAVA_HOME in this file, so that it is correctly defined on +# remote nodes. + +# The java implementation to use. +export JAVA_HOME=${JAVA_HOME} + +# The jsvc implementation to use. Jsvc is required to run secure datanodes. +#export JSVC_HOME=${JSVC_HOME} + +export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-"/etc/hadoop"} + +# Extra Java CLASSPATH elements. Automatically insert capacity-scheduler. +for f in $HADOOP_HOME/contrib/capacity-scheduler/*.jar; do + if [ "$HADOOP_CLASSPATH" ]; then +export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$f + else +export HADOOP_CLASSPATH=$f + fi +done + +# The maximum amount of heap to use, in MB. Default is 1000. +#export HADOOP_HEAPSIZE= +#export HADOOP_NAMENODE_INIT_HEAPSIZE="" + +# Extra Java runtime options. Empty by default. +export HADOOP_OPTS="-Djava.net.preferIPv4Stack=true $HADOOP_CLIENT_OPTS" + +# Command specific options appended to HADOOP_OPTS when specified +export HADOOP_NAMENODE_OPTS="-Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,RFAS} -Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER:-INFO,NullAppender} $HADOOP_NAMENODE_OPTS" +export HADOOP_DATANODE_OPTS="-Dhadoop.security.logger=ERROR,RFAS $HADOOP_DATANODE_OPTS" + +export HADOOP_SECONDARYNAMENODE_OPTS="-Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,RFAS} -Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER:-INFO,NullAppender} $HADOOP_SECONDARYNAMENODE_OPTS" + +# The following applies to multiple commands (fs, dfs, fsck, distcp etc) +export HADOOP_CLIENT_OPTS="-Xmx128m $HADOOP_CLIENT_OPTS" +#HADOOP_JAVA_PLATFORM_OPTS="-XX:-UsePerfData $HADOOP_JAVA_PLATFORM_OPTS" + +# On secure datanodes, user to run the datanode as after dropping privileges +export HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER} + +# Where log files are stored. $HADOOP_HOME/logs by default. +export HADOOP_LOG_DIR=${HADOOP_LOG_DIR}/$USER + +# Where log files are stored in the secure data environment. +export HADOOP_SECURE_DN_LOG_DIR=${HADOOP_LOG_DIR}/${HADOOP_HDFS_USER} + +# The directory where pid files are stored. /tmp by default. +export HADOOP_PID_DIR=${HADOOP_PID_DIR} +export HADOOP_SECURE_DN_PID_DIR=${HADOOP_PID_DIR} + +# A string representing this instance of hadoop. $USER by default. +export HADOOP_IDENT_STRING=$USER
svn commit: r1339907 - in /hadoop/common/branches/branch-2/hadoop-common-project: ./ hadoop-auth/ hadoop-common/ hadoop-common/src/main/conf/ hadoop-common/src/main/docs/ hadoop-common/src/main/java/
Author: eli Date: Thu May 17 22:49:12 2012 New Revision: 1339907 URL: http://svn.apache.org/viewvc?rev=1339907&view=rev Log: HADOOP-8287. etc/hadoop is missing hadoop-env.sh. Contributed by Eli Collins Added: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh - copied unchanged from r1339906, hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh Modified: hadoop/common/branches/branch-2/hadoop-common-project/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-auth/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (contents, props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/docs/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/core/ (props changed) Propchange: hadoop/common/branches/branch-2/hadoop-common-project/ -- Merged /hadoop/common/trunk/hadoop-common-project:r1339906 Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-auth/ -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-auth:r1339906 Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/ -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common:r1339906 Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1339907&r1=1339906&r2=1339907&view=diff == --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Thu May 17 22:49:12 2012 @@ -38,6 +38,8 @@ Release 2.0.1-alpha - UNRELEASED HADOOP-8406. CompressionCodecFactory.CODEC_PROVIDERS iteration is thread-unsafe (todd) +HADOOP-8287. etc/hadoop is missing hadoop-env.sh (eli) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt:r1339906 Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/docs/ -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/docs:r1339906 Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/ -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java:r1339906 Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/core/ -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/core:r1339906
svn commit: r1339938 - in /hadoop/common/branches/branch-1: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java
Author: eli Date: Fri May 18 00:49:29 2012 New Revision: 1339938 URL: http://svn.apache.org/viewvc?rev=1339938&view=rev Log: HDFS-3330. If GetImageServlet throws an Error or RTE, response should not have HTTP "OK" status. Contributed by Todd Lipcon Modified: hadoop/common/branches/branch-1/CHANGES.txt hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java Modified: hadoop/common/branches/branch-1/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1339938&r1=1339937&r2=1339938&view=diff == --- hadoop/common/branches/branch-1/CHANGES.txt (original) +++ hadoop/common/branches/branch-1/CHANGES.txt Fri May 18 00:49:29 2012 @@ -234,6 +234,9 @@ Release 1.1.0 - unreleased MAPREDUCE-4241. Pipes examples do not compile on Ubuntu 12.04. (Andrew Bayer via eli) +HDFS-3330. If GetImageServlet throws an Error or RTE, response should not +have HTTP "OK" status. (todd via eli) + Release 1.0.3 - 2012.05.07 NEW FEATURES Modified: hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java?rev=1339938&r1=1339937&r2=1339938&view=diff == --- hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java (original) +++ hadoop/common/branches/branch-1/src/hdfs/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java Fri May 18 00:49:29 2012 @@ -126,8 +126,8 @@ public class GetImageServlet extends Htt } }); -} catch (Exception ie) { - String errMsg = "GetImage failed. " + StringUtils.stringifyException(ie); +} catch (Throwable t) { + String errMsg = "GetImage failed. " + StringUtils.stringifyException(t); response.sendError(HttpServletResponse.SC_GONE, errMsg); throw new IOException(errMsg); } finally {
svn commit: r1339945 - /hadoop/common/branches/branch-1/src/docs/releasenotes.html
Author: mattf Date: Fri May 18 01:25:57 2012 New Revision: 1339945 URL: http://svn.apache.org/viewvc?rev=1339945&view=rev Log: update release notes from 1.0.3 on hadoop-1 code line Modified: hadoop/common/branches/branch-1/src/docs/releasenotes.html Modified: hadoop/common/branches/branch-1/src/docs/releasenotes.html URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/docs/releasenotes.html?rev=1339945&r1=1339944&r2=1339945&view=diff == --- hadoop/common/branches/branch-1/src/docs/releasenotes.html (original) +++ hadoop/common/branches/branch-1/src/docs/releasenotes.html Fri May 18 01:25:57 2012 @@ -2,7 +2,7 @@ -Hadoop 1.0.2 Release Notes +Hadoop 1.0.3 Release Notes H1 {font-family: sans-serif} H2 {font-family: sans-serif; margin-left: 7mm} @@ -10,11 +10,177 @@ -Hadoop 1.0.2 Release Notes +Hadoop 1.0.3 Release Notes These release notes include new developer and user-facing incompatibilities, features, and major improvements. +Changes since Hadoop 1.0.2 + +Jiras with Release Notes (describe major or incompatible changes) + + + https://issues.apache.org/jira/browse/HADOOP-5528";>HADOOP-5528. + Major new feature reported by klbostee and fixed by klbostee + Binary partitioner + New BinaryPartitioner that partitions BinaryComparable keys by hashing a configurable part of the bytes array corresponding to the key. + + + + + https://issues.apache.org/jira/browse/HADOOP-8352";>HADOOP-8352. + Major improvement reported by owen.omalley and fixed by owen.omalley + We should always generate a new configure script for the c++ code + If you are compiling c++, the configure script will now be automatically regenerated as it should be.This requires autoconf version 2.61 or greater. + + https://issues.apache.org/jira/browse/MAPREDUCE-4017";>MAPREDUCE-4017. + Trivial improvement reported by knoguchi and fixed by tgraves (jobhistoryserver, jobtracker) + Add jobname to jobsummary log + The Job Summary log may contain commas in values that are escaped by a '\' character. This was true before, but is more likely to be exposed now. + + + + + + + +Other Jiras (describe bug fixes and minor changes) + + + https://issues.apache.org/jira/browse/HADOOP-6924";>HADOOP-6924. + Major bug reported by wattsteve and fixed by devaraj + Build fails with non-Sun JREs due to different pathing to the operating system architecture shared libraries + The src/native/configure script used to build the native libraries has an environment variable called JNI_LDFLAGS which is set as follows:JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH/server"This pathing convention to the shared libraries for the operating system architecture is unique to Oracle/Sun Java and thus on other flavors of Java the path will not exist and will result in a build failure with the following exception: [exec] gcc -shared ../src/org/apache/hadoop/io/compress/zlib... + + https://issues.apache.org/jira/browse/HADOOP-6941";>HADOOP-6941. + Major bug reported by wattsteve and fixed by devaraj + Support non-SUN JREs in UserGroupInformation + Attempting to format the namenode or attempting to start Hadoop using Apache Harmony or the IBM Java JREs results in the following exception:10/09/07 16:35:05 ERROR namenode.NameNode: java.lang.NoClassDefFoundError: com.sun.security.auth.UnixPrincipal at org.apache.hadoop.security.UserGroupInformation.(UserGroupInformation.java:223) at java.lang.J9VMInternals.initializeImpl(Native Method)at java.lang.J9VMInternals.initialize(J9VMInternals.java:200) at org.apache.hadoop.hdfs.ser... + + https://issues.apache.org/jira/browse/HADOOP-6963";>HADOOP-6963. + Critical bug reported by owen.omalley and fixed by raviprak (fs) + Fix FileUtil.getDU. It should not include the size of the directory or follow symbolic links + The getDU method should not include the size of the directory. The Java interface says that the value is undefined and in Linux/Sun it gets the 4096 for the inode. Clearly this isn't useful.It also recursively calls itself. In case the directory has a symbolic link forming a cycle, getDU keeps spinning in the cycle. In our case, we saw this in the org.apache.hadoop.mapred.JobLocalizer.downloadPrivateCacheObjects call. This prevented other tasks on the same node from committing, causing the T... + + https://issues.apache.org/jira/browse/HADOOP-7381";>HADOOP-7381. + Major bug reported by jrottinghuis and fixed by jrottinghuis (build) + FindBugs OutOfMemoryError + When running the findbugs target from Jenkins, I get an OutOfMemory error.The "effort" in FindBugs is set to Max which ends up using a lot of memory to go thr
svn commit: r1339970 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java src/test/java/org/apache/hadoop/fs/viewfs/
Author: eli Date: Fri May 18 04:20:28 2012 New Revision: 1339970 URL: http://svn.apache.org/viewvc?rev=1339970&view=rev Log: HADOOP-8408. MR doesn't work with a non-default ViewFS mount table and security enabled. Contributed by Aaron T. Myers Added: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1339970&r1=1339969&r2=1339970&view=diff == --- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Fri May 18 04:20:28 2012 @@ -183,6 +183,9 @@ Release 2.0.1-alpha - UNRELEASED HADOOP-8287. etc/hadoop is missing hadoop-env.sh (eli) +HADOOP-8408. MR doesn't work with a non-default ViewFS mount table +and security enabled. (atm via eli) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java?rev=1339970&r1=1339969&r2=1339970&view=diff == --- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java (original) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java Fri May 18 04:20:28 2012 @@ -233,6 +233,11 @@ public class ViewFileSystem extends File fsState.resolve(getUriPath(f), true); return res.isInternalDir() ? null : res.targetFileSystem.getHomeDirectory(); } + + @Override + public String getCanonicalServiceName() { +return getUri().getHost(); + } @Override public URI getUri() { Added: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java?rev=1339970&view=auto == --- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java (added) +++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java Fri May 18 04:20:28 2012 @@ -0,0 +1,73 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.fs.viewfs; + +import static org.junit.Assert.*; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.FsConstants; +import org.junit.Test; + +/** + * Test ViewFileSystem's support for having delegation tokens fetched and cached + * for the file system. + */ +public class TestViewFileSystemDelegationTokenSupport { + + private static final String MOUNT_TABLE_NAME = "vfs-cluster"; + + /** + * Ensure that a canonical service name can be determined for ViewFileSystem + * instances configured with a non-default mount table name. + * + * Regression test for HADOOP-8408. + */ + @Test + public void testGetCanonicalServiceNameWithNonDefaultMountTable() + throws URISyntaxException, IOException { + +Configuration conf = new Configuration(); +ConfigUtil.addLink(conf,
svn commit: r1339971 - in /hadoop/common/branches/branch-2/hadoop-common-project: ./ hadoop-auth/ hadoop-common/ hadoop-common/src/main/docs/ hadoop-common/src/main/java/ hadoop-common/src/main/java/o
Author: eli Date: Fri May 18 04:22:30 2012 New Revision: 1339971 URL: http://svn.apache.org/viewvc?rev=1339971&view=rev Log: HADOOP-8408. MR doesn't work with a non-default ViewFS mount table and security enabled. Contributed by Aaron T. Myers Added: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java - copied unchanged from r1339970, hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemDelegationTokenSupport.java Modified: hadoop/common/branches/branch-2/hadoop-common-project/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-auth/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (contents, props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/docs/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/ (props changed) hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/core/ (props changed) Propchange: hadoop/common/branches/branch-2/hadoop-common-project/ -- Merged /hadoop/common/trunk/hadoop-common-project:r1339970 Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-auth/ -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-auth:r1339970 Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/ -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common:r1339970 Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1339971&r1=1339970&r2=1339971&view=diff == --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Fri May 18 04:22:30 2012 @@ -40,6 +40,9 @@ Release 2.0.1-alpha - UNRELEASED HADOOP-8287. etc/hadoop is missing hadoop-env.sh (eli) +HADOOP-8408. MR doesn't work with a non-default ViewFS mount table +and security enabled. (atm via eli) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt:r1339970 Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/docs/ -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/docs:r1339970 Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/ -- Merged /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java:r1339970 Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java?rev=1339971&r1=1339970&r2=1339971&view=diff == --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java Fri May 18 04:22:30 2012 @@ -233,6 +233,11 @@ public class ViewFileSystem extends File fsState.resolve(getUriPath(f), true); return res.isInternalDir() ? null : res.targetFileSystem.getHomeDirectory(); } + + @Override + public String getCanonicalServiceName() { +return getUri().getHost(); + } @Override public URI getUri() { Propchange: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/test/core/ -- Merged /hado