瀏覽代碼

HADOOP-1973. The FileSystem object would be accessed on the JobTracker through a RPC in the InterTrackerProtocol. The check for the object being null was missing and hence NPE would be thrown sometimes. This issue fixes that problem. Contributed by Amareshwari Sri Ramadesu.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@585409 13f79535-47bb-0310-9956-ffa450edef68
Devaraj Das 18 年之前
父節點
當前提交
6e37fd14b2
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 5 0
      CHANGES.txt
  2. 3 0
      src/java/org/apache/hadoop/mapred/JobTracker.java

+ 5 - 0
CHANGES.txt

@@ -314,6 +314,11 @@ Branch 0.15 (unreleased changes)
     than the InterruptedException. This behavior is there for the other long
     running threads in the JobTracker. (Arun C Murthy via ddas)
 
+    HADOOP-1973. The FileSystem object would be accessed on the JobTracker
+    through a RPC in the InterTrackerProtocol. The check for the object being
+    null was missing and hence NPE would be thrown sometimes. This issue fixes
+    that problem.  (Amareshwari Sri Ramadasu via ddas) 
+
   IMPROVEMENTS
 
     HADOOP-1908. Restructure data node code so that block sending and 

+ 3 - 0
src/java/org/apache/hadoop/mapred/JobTracker.java

@@ -1471,6 +1471,9 @@ public class JobTracker implements MRConstants, InterTrackerProtocol, JobSubmiss
    * Grab the local fs name
    */
   public synchronized String getFilesystemName() throws IOException {
+    if (fs == null) {
+      throw new IllegalStateException("FileSystem object not available yet");
+    }
     return fs.getName();
   }