Browse Source

MAPREDUCE-2353. MR changes to reflect the API changes in SecureIO library. Contributed by Devaraj Das and Benoy Antony.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.22@1346248 13f79535-47bb-0310-9956-ffa450edef68
Konstantin Shvachko 13 years ago
parent
commit
342d1e0ed4

+ 3 - 0
mapreduce/CHANGES.txt

@@ -50,6 +50,9 @@ Release 0.22.1 - Unreleased
     MAPREDUCE-2651. Fix race condition in Linux task controller for
     job log directory creation. (Bharath Mundlapudi and Benoy Antony via shv)
 
+    MAPREDUCE-2353. MR changes to reflect the API changes in SecureIO library.
+    (Devaraj Das and Benoy Antony via shv)
+
 Release 0.22.0 - 2011-11-29
 
   INCOMPATIBLE CHANGES

+ 3 - 2
mapreduce/src/java/org/apache/hadoop/mapred/JvmManager.java

@@ -365,10 +365,11 @@ static class JvmManagerForType {
         return;
       }
       //*MUST* never reach this
-      throw new RuntimeException("Inconsistent state!!! " +
+      LOG.fatal("Inconsistent state!!! " +
           "JVM Manager reached an unstable state " +
             "while reaping a JVM for task: " + t.getTask().getTaskID()+
-            " " + getDetails());
+            " " + getDetails()+ ". Aborting. ");
+      System.exit(-1);
     }
     
     private synchronized String getDetails() {

+ 1 - 1
mapreduce/src/java/org/apache/hadoop/mapred/SpillRecord.java

@@ -66,7 +66,7 @@ class SpillRecord {
     final FileSystem rfs = FileSystem.getLocal(job).getRaw();
     final DataInputStream in = 
       new DataInputStream(SecureIOUtils.openForRead(
-          new File(indexFileName.toUri().getPath()), expectedIndexOwner, null));
+          new File(indexFileName.toUri().getPath()), expectedIndexOwner));
     try {
       final long length = rfs.getFileStatus(indexFileName).getLen();
       final int partitions = (int) length / MAP_OUTPUT_INDEX_RECORD_LENGTH;

+ 2 - 2
mapreduce/src/java/org/apache/hadoop/mapred/TaskLog.java

@@ -104,7 +104,7 @@ public class TaskLog {
   throws IOException {
     File indexFile = getIndexFile(taskid, isCleanup);
     BufferedReader fis = new BufferedReader(new InputStreamReader(
-      SecureIOUtils.openForRead(indexFile, obtainLogDirOwner(taskid), null)));
+      SecureIOUtils.openForRead(indexFile, obtainLogDirOwner(taskid))));
     //the format of the index file is
     //LOG_DIR: <the dir where the task logs are really stored>
     //stdout:<start-offset in the stdout file> <length>
@@ -321,7 +321,7 @@ public class TaskLog {
       bytesRemaining = end - start;
       String owner = obtainLogDirOwner(taskid);
       file = SecureIOUtils.openForRead(new File(fileDetail.location, kind.toString()), 
-          owner, null);
+          owner);
       // skip upto start
       long pos = 0;
       while (pos < start) {

+ 1 - 1
mapreduce/src/java/org/apache/hadoop/mapred/TaskTracker.java

@@ -3710,7 +3710,7 @@ public class TaskTracker
          */
         //open the map-output file
         mapOutputIn = SecureIOUtils.openForRead(
-            new File(mapOutputFileName.toUri().getPath()), runAsUserName, null);
+            new File(mapOutputFileName.toUri().getPath()), runAsUserName);
         //seek to the correct offset for the reduce
         IOUtils.skipFully(mapOutputIn, info.startOffset);