incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1063094 - in /incubator/hama/trunk: ./ lib/ src/java/org/apache/hama/bsp/
Date Tue, 25 Jan 2011 01:22:12 GMT
Author: edwardyoon
Date: Tue Jan 25 01:22:11 2011
New Revision: 1063094

URL: http://svn.apache.org/viewvc?rev=1063094&view=rev
Log:
Removing JSON-related dependencies and some code cleaning

Removed:
    incubator/hama/trunk/lib/AgileJSON-2009-03-30.jar
    incubator/hama/trunk/lib/json.jar
Modified:
    incubator/hama/trunk/pom.xml
    incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJob.java
    incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJobClient.java
    incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java
    incubator/hama/trunk/src/java/org/apache/hama/bsp/QueueManager.java

Modified: incubator/hama/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/pom.xml?rev=1063094&r1=1063093&r2=1063094&view=diff
==============================================================================
--- incubator/hama/trunk/pom.xml (original)
+++ incubator/hama/trunk/pom.xml Tue Jan 25 01:22:11 2011
@@ -98,13 +98,6 @@
       <systemPath>${project.basedir}/lib/commons-el-from-jetty-5.1.4.jar</systemPath>
     </dependency>
     <dependency>
-      <groupId>agilejson</groupId>
-      <artifactId>agilejson</artifactId>
-      <version>20090330</version>
-      <scope>system</scope>
-      <systemPath>${project.basedir}/lib/AgileJSON-2009-03-30.jar</systemPath>
-    </dependency>
-    <dependency>
       <groupId>commons-httpclient</groupId>
       <artifactId>commons-httpclient</artifactId>
       <version>3.0.1</version>
@@ -189,13 +182,6 @@
       <systemPath>${project.basedir}/lib/jetty-util-6.1.14.jar</systemPath>
     </dependency>
     <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20090211</version>
-      <scope>system</scope>
-      <systemPath>${project.basedir}/lib/json.jar</systemPath>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>3.8.1</version>

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJob.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJob.java?rev=1063094&r1=1063093&r2=1063094&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJob.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJob.java Tue Jan 25 01:22:11 2011
@@ -66,8 +66,7 @@ public class BSPJob extends BSPJobContex
     setNumBspTask(tasks);
   }
 
-  @SuppressWarnings("unchecked")
-  public BSPJob(HamaConfiguration conf, Class exampleClass) throws IOException {
+  public BSPJob(HamaConfiguration conf, Class<?> exampleClass) throws IOException {
     this(conf);
     setJarByClass(exampleClass);
   }
@@ -116,15 +115,14 @@ public class BSPJob extends BSPJobContex
     }
   }
 
-  @SuppressWarnings("unchecked")
-  private static String findContainingJar(Class my_class) {
+  private static String findContainingJar(Class<?> my_class) {
     ClassLoader loader = my_class.getClassLoader();
     String class_file = my_class.getName().replaceAll("\\.", "/") + ".class";
     try {
-      for (Enumeration itr = loader.getResources(class_file); itr
+      for (Enumeration<URL> itr = loader.getResources(class_file); itr
           .hasMoreElements();) {
 
-        URL url = (URL) itr.nextElement();
+        URL url = itr.nextElement();
         if ("jar".equals(url.getProtocol())) {
           String toReturn = url.getPath();
           if (toReturn.startsWith("file:")) {

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJobClient.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJobClient.java?rev=1063094&r1=1063093&r2=1063094&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJobClient.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJobClient.java Tue Jan 25 01:22:11
2011
@@ -192,9 +192,9 @@ public class BSPJobClient extends Config
 
   public void init(Configuration conf) throws IOException {
     this.jobSubmitClient = (JobSubmissionProtocol) RPC.getProxy(
-        JobSubmissionProtocol.class, JobSubmissionProtocol.versionID, BSPMaster
-            .getAddress(conf), conf, NetUtils.getSocketFactory(conf,
-            JobSubmissionProtocol.class));
+        JobSubmissionProtocol.class, JobSubmissionProtocol.versionID,
+        BSPMaster.getAddress(conf), conf,
+        NetUtils.getSocketFactory(conf, JobSubmissionProtocol.class));
   }
 
   /**
@@ -274,7 +274,6 @@ public class BSPJobClient extends Config
         + Integer.toString(Math.abs(r.nextInt()), 36));
     Path submitJarFile = new Path(submitJobDir, "job.jar");
     Path submitJobFile = new Path(submitJobDir, "job.xml");
-
     LOG.debug("BSPJobClient.submitJobDir: " + submitJobDir);
 
     /*
@@ -332,8 +331,8 @@ public class BSPJobClient extends Config
     //
     // Now, actually submit the job (using the submit name)
     //
-    JobStatus status = jobSubmitClient.submitJob(jobId, submitJobFile
-        .toString());
+    JobStatus status = jobSubmitClient.submitJob(jobId,
+        submitJobFile.toString());
     if (status != null) {
       return new NetworkedJob(status);
     } else {

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java?rev=1063094&r1=1063093&r2=1063094&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java Tue Jan 25 01:22:11
2011
@@ -32,7 +32,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.LinkedBlockingQueue;
 
 import org.apache.commons.logging.Log;
@@ -50,9 +49,9 @@ import org.apache.hadoop.metrics.Metrics
 import org.apache.hadoop.net.DNS;
 import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.util.DiskChecker;
+import org.apache.hadoop.util.DiskChecker.DiskErrorException;
 import org.apache.hadoop.util.RunJar;
 import org.apache.hadoop.util.StringUtils;
-import org.apache.hadoop.util.DiskChecker.DiskErrorException;
 import org.apache.hama.Constants;
 import org.apache.hama.HamaConfiguration;
 import org.apache.hama.ipc.MasterProtocol;

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/QueueManager.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/QueueManager.java?rev=1063094&r1=1063093&r2=1063094&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/QueueManager.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/QueueManager.java Tue Jan 25 01:22:11
2011
@@ -20,7 +20,6 @@ package org.apache.hama.bsp;
 
 import java.io.IOException;
 
-import java.util.Collection;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ConcurrentHashMap;
 



Mime
View raw message