hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r699440 - in /hadoop/core/branches/branch-0.19: CHANGES.txt src/mapred/org/apache/hadoop/mapred/JobID.java src/mapred/org/apache/hadoop/mapred/JobTracker.java
Date Fri, 26 Sep 2008 18:03:19 GMT
Author: omalley
Date: Fri Sep 26 11:03:19 2008
New Revision: 699440

URL: http://svn.apache.org/viewvc?rev=699440&view=rev
Log:
HADOOP-4275. Move public method isJobValidName from JobID to a private
method in JobTracker. (omalley)

Modified:
    hadoop/core/branches/branch-0.19/CHANGES.txt
    hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobID.java
    hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobTracker.java

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=699440&r1=699439&r2=699440&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Fri Sep 26 11:03:19 2008
@@ -216,8 +216,8 @@
     HADOOP-4205. hive: metastore and ql to use the refactored SerDe library.
     (zshao)
 
-    HADOOP-4106. libhdfs: add time, permission and user attribute support (part 2).
-    (Pete Wyckoff through zshao)
+    HADOOP-4106. libhdfs: add time, permission and user attribute support 
+    (part 2). (Pete Wyckoff through zshao)
 
     HADOOP-4104. libhdfs: add time, permission and user attribute support.
     (Pete Wyckoff through zshao)
@@ -744,6 +744,9 @@
     HADOOP-4259. Findbugs should run over tools.jar also. (cdouglas via 
     omalley)
 
+    HADOOP-4275. Move public method isJobValidName from JobID to a private
+    method in JobTracker. (omalley)
+
 Release 0.18.2 - Unreleased
 
   BUG FIXES

Modified: hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobID.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobID.java?rev=699440&r1=699439&r2=699440&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobID.java (original)
+++ hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobID.java Fri Sep
26 11:03:19 2008
@@ -152,23 +152,6 @@
         + " is not properly formed");
   }
   
-  /** Check if the given string represents a job-id or not 
-   */
-  public static boolean isJobNameValid(String str) {
-    if(str == null) {
-      return false;
-    }
-    String[] parts = str.split("_");
-    if(parts.length == 3) {
-      if(parts[0].equals(JOB)) {
-          // other 2 parts should be parseable
-          return JobTracker.validateIdentifier(parts[1])
-                 && JobTracker.validateJobNumber(parts[2]);
-      }
-    }
-    return false;
-  }
-  
   /** 
    * Returns a regex pattern which matches task IDs. Arguments can 
    * be given null, in which case that part of the regex will be generic.  

Modified: hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=699440&r1=699439&r2=699440&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobTracker.java Fri
Sep 26 11:03:19 2008
@@ -579,10 +579,27 @@
       return jobsToRecover.size() != 0;
     }
 
+    /** Check if the given string represents a job-id or not 
+     */
+    private boolean isJobNameValid(String str) {
+      if(str == null) {
+        return false;
+      }
+      String[] parts = str.split("_");
+      if(parts.length == 3) {
+        if(parts[0].equals("job")) {
+            // other 2 parts should be parseable
+            return JobTracker.validateIdentifier(parts[1])
+                   && JobTracker.validateJobNumber(parts[2]);
+        }
+      }
+      return false;
+    }
+    
     // checks if the job dir has the required files
     public void checkAndAddJob(FileStatus status) throws IOException {
       String jobName = status.getPath().getName();
-      if (JobID.isJobNameValid(jobName)) {
+      if (isJobNameValid(jobName)) {
         if (JobClient.isJobDirValid(status.getPath(), fs)) {
           recoveryManager.addJobForRecovery(JobID.forName(jobName));
         } else {



Mime
View raw message