hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject svn commit: r653105 - in /hadoop/core/trunk: ./ src/contrib/eclipse-plugin/META-INF/ src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/ src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/view/servers/
Date Sat, 03 May 2008 19:03:21 GMT
Author: nigel
Date: Sat May  3 12:03:20 2008
New Revision: 653105

URL: http://svn.apache.org/viewvc?rev=653105&view=rev
Log:
HADOOP-3338. Fix Eclipse plugin to compile after HADOOP-544 was committed. Updated all references
to use the new JobID representation. Contributed by Christophe Taton.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/contrib/eclipse-plugin/META-INF/MANIFEST.MF
    hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopJob.java
    hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopServer.java
    hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/view/servers/ServerView.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=653105&r1=653104&r2=653105&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Sat May  3 12:03:20 2008
@@ -131,6 +131,10 @@
     HADOOP-3301. Fix misleading error message when S3 URI hostname
     contains an underscore. (tomwhite via omalley)
 
+    HADOOP-3338. Fix Eclipse plugin to compile after HADOOP-544 was
+    committed. Updated all references to use the new JobID representation.
+    (taton via nigel)
+
 Release 0.17.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/contrib/eclipse-plugin/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/eclipse-plugin/META-INF/MANIFEST.MF?rev=653105&r1=653104&r2=653105&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/eclipse-plugin/META-INF/MANIFEST.MF (original)
+++ hadoop/core/trunk/src/contrib/eclipse-plugin/META-INF/MANIFEST.MF Sat May  3 12:03:20
2008
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: MapReduce Tools for Eclipse
 Bundle-SymbolicName: org.apache.hadoop.eclipse;singleton:=true
-Bundle-Version: 0.16.2
+Bundle-Version: 0.18
 Bundle-Activator: org.apache.hadoop.eclipse.Activator
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.ui,

Modified: hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopJob.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopJob.java?rev=653105&r1=653104&r2=653105&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopJob.java
(original)
+++ hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopJob.java
Sat May  3 12:03:20 2008
@@ -26,6 +26,7 @@
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.mapred.Counters;
 import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.mapred.JobID;
 import org.apache.hadoop.mapred.JobStatus;
 import org.apache.hadoop.mapred.RunningJob;
 
@@ -72,7 +73,7 @@
   /**
    * Unique identifier of this Job
    */
-  final String jobId;
+  final JobID jobId;
 
   /**
    * Status representation of a running job. This actually contains a
@@ -123,7 +124,7 @@
    * @param running
    * @param status
    */
-  public HadoopJob(HadoopServer location, String id, RunningJob running,
+  public HadoopJob(HadoopServer location, JobID id, RunningJob running,
       JobStatus status) {
 
     this.location = location;
@@ -143,7 +144,7 @@
     try {
       String jobFile = getJobFile();
       FileSystem fs = location.getDFS();
-      File tmp = File.createTempFile(getJobId(), ".xml");
+      File tmp = File.createTempFile(getJobID().toString(), ".xml");
       if (FileUtil.copy(fs, new Path(jobFile), tmp, false, location
           .getConfiguration())) {
         this.jobConf = new JobConf(tmp.toString());
@@ -211,7 +212,7 @@
   /**
    * @return
    */
-  public String getJobId() {
+  public JobID getJobID() {
     return this.jobId;
   }
 
@@ -326,8 +327,8 @@
    * Print this job status (for debugging purpose)
    */
   public void display() {
-    System.out.printf("Job id=%s, name=%s\n", getJobId(), getJobName());
-    System.out.printf("Configuration file: %s\n", getJobId());
+    System.out.printf("Job id=%s, name=%s\n", getJobID(), getJobName());
+    System.out.printf("Configuration file: %s\n", getJobID());
     System.out.printf("Tracking URL: %s\n", getTrackingURL());
 
     System.out.printf("Completion: map: %f reduce %f\n",

Modified: hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopServer.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopServer.java?rev=653105&r1=653104&r2=653105&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopServer.java
(original)
+++ hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/server/HadoopServer.java
Sat May  3 12:03:20 2008
@@ -38,6 +38,7 @@
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.mapred.JobClient;
 import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.mapred.JobID;
 import org.apache.hadoop.mapred.JobStatus;
 import org.apache.hadoop.mapred.RunningJob;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -110,13 +111,13 @@
 
       try {
         // Set of all known existing Job IDs we want fresh info of
-        Set<String> missingJobIds =
-            new HashSet<String>(runningJobs.keySet());
+        Set<JobID> missingJobIds =
+            new HashSet<JobID>(runningJobs.keySet());
 
         JobStatus[] jstatus = client.jobsToComplete();
         for (JobStatus status : jstatus) {
 
-          String jobId = status.getJobId();
+          JobID jobId = status.getJobID();
           missingJobIds.remove(jobId);
 
           HadoopJob hJob;
@@ -136,7 +137,7 @@
         }
 
         // Ask explicitly for fresh info for these Job IDs
-        for (String jobId : missingJobIds) {
+        for (JobID jobId : missingJobIds) {
           HadoopJob hJob = runningJobs.get(jobId);
           if (!hJob.isCompleted())
             updateJob(hJob, null);
@@ -161,7 +162,7 @@
      * @param data
      */
     private void newJob(final HadoopJob data) {
-      runningJobs.put(data.getJobId(), data);
+      runningJobs.put(data.getJobID(), data);
 
       Display.getDefault().asyncExec(new Runnable() {
         public void run() {
@@ -203,8 +204,8 @@
   /**
    * Jobs running on this location. The keys of this map are the Job IDs.
    */
-  private transient Map<String, HadoopJob> runningJobs =
-      Collections.synchronizedMap(new TreeMap<String, HadoopJob>());
+  private transient Map<JobID, HadoopJob> runningJobs =
+      Collections.synchronizedMap(new TreeMap<JobID, HadoopJob>());
 
   /**
    * Status updater for this location
@@ -272,7 +273,7 @@
    * @param job the job to remove
    */
   public void purgeJob(final HadoopJob job) {
-    runningJobs.remove(job.getJobId());
+    runningJobs.remove(job.getJobID());
     Display.getDefault().asyncExec(new Runnable() {
       public void run() {
         fireJobRemoved(job);

Modified: hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/view/servers/ServerView.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/view/servers/ServerView.java?rev=653105&r1=653104&r2=653105&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/view/servers/ServerView.java
(original)
+++ hadoop/core/trunk/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/view/servers/ServerView.java
Sat May  3 12:03:20 2008
@@ -106,7 +106,7 @@
             // Job is running, kill the job?
             if (MessageDialog.openConfirm(Display.getDefault()
                 .getActiveShell(), "Confirm kill running Job",
-                "Do you really want to kill running Job: " + job.getJobId())) {
+                "Do you really want to kill running Job: " + job.getJobID())) {
               job.kill();
             }
           }
@@ -385,7 +385,7 @@
 
       switch (columnIndex) {
         case 0:
-          return job.getJobId();
+          return job.getJobID().toString();
         case 1:
           return "";
         case 2:



Mime
View raw message