hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject svn commit: r938324 - in /hadoop/mapreduce/trunk: CHANGES.txt src/test/mapred/org/apache/hadoop/mapred/TestWebUIAuthorization.java src/webapps/job/jobconf_history.jsp
Date Tue, 27 Apr 2010 04:52:42 GMT
Author: vinodkv
Date: Tue Apr 27 04:52:42 2010
New Revision: 938324

URL: http://svn.apache.org/viewvc?rev=938324&view=rev
Log:
MAPREDUCE-1612. job conf file is not accessible from job history web page. Contributed by
Ravi Gummadi and Sreekanth Ramakrishnan.

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestWebUIAuthorization.java
    hadoop/mapreduce/trunk/src/webapps/job/jobconf_history.jsp

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=938324&r1=938323&r2=938324&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Tue Apr 27 04:52:42 2010
@@ -593,6 +593,9 @@ Trunk (unreleased changes)
     MAPREDUCE-1705. Archiving and Purging of HDFS parity files should 
     handle globbed policies accurately. (Rodrigo Schmidt via dhruba)
 
+    MAPREDUCE-1612. job conf file is not accessible from job history web page.
+    (Ravi Gummadi and Sreekanth Ramakrishnan via vinodkv)
+
 Release 0.21.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestWebUIAuthorization.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestWebUIAuthorization.java?rev=938324&r1=938323&r2=938324&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestWebUIAuthorization.java
(original)
+++ hadoop/mapreduce/trunk/src/test/mapred/org/apache/hadoop/mapred/TestWebUIAuthorization.java
Tue Apr 27 04:52:42 2010
@@ -241,7 +241,8 @@ public class TestWebUIAuthorization exte
     props.setProperty(MRConfig.JOB_LEVEL_AUTHORIZATION_ENABLING_FLAG,
         String.valueOf(true));
     props.setProperty("dfs.permissions.enabled", "false");
-
+    props.setProperty("mapred.job.tracker.history.completed.location",
+        "historyDoneFolderOnHDFS");
     props.setProperty("mapreduce.job.committer.setup.cleanup.needed",
         "false");
     props.setProperty(MRConfig.MR_SUPERGROUP, "superGroup");

Modified: hadoop/mapreduce/trunk/src/webapps/job/jobconf_history.jsp
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/webapps/job/jobconf_history.jsp?rev=938324&r1=938323&r2=938324&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/webapps/job/jobconf_history.jsp (original)
+++ hadoop/mapreduce/trunk/src/webapps/job/jobconf_history.jsp Tue Apr 27 04:52:42 2010
@@ -64,22 +64,11 @@
     jobFile = fs.open(jobFilePath);
     JobConf jobConf = new JobConf(jobFilePath);
     JobTracker jobTracker = (JobTracker) application.getAttribute("job.tracker");
-    String user = request.getRemoteUser();
-    if (user != null) {
-      try {
-        jobTracker.getJobACLsManager().checkAccess(JobID.forName(jobId),
-            UserGroupInformation.createRemoteUser(user), JobACL.VIEW_JOB,
-            jobConf.getUser(),
-            new AccessControlList(jobConf.get(JobACL.VIEW_JOB.getAclName())));
-        } catch (AccessControlException e) {
-          String errMsg =
-            user
-                + " is not authorized to view details of job "
-                + jobId
-                + "<hr><a href=\"jobhistory.jsp\">Go back to JobHistory</a><br>";
-        JSPUtil.setErrorAndForward(errMsg, request, response);
-        return;
-        }
+
+    JobHistoryParser.JobInfo job = JSPUtil.checkAccessAndGetJobInfo(request,
+        response, jobTracker, fs, logFile);
+    if (job == null) {
+      return;
     }
 
     XMLUtils.transform(



Mime
View raw message