incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1140021 - in /incubator/hama/trunk: NOTICE.txt pom.xml src/examples/org/apache/hama/examples/graph/PageRank.java src/java/org/apache/hama/http/HttpServer.java
Date Mon, 27 Jun 2011 05:27:32 GMT
Author: edwardyoon
Date: Mon Jun 27 05:27:32 2011
New Revision: 1140021

URL: http://svn.apache.org/viewvc?rev=1140021&view=rev
Log:
Fix dependencies problems.

Modified:
    incubator/hama/trunk/NOTICE.txt
    incubator/hama/trunk/pom.xml
    incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java
    incubator/hama/trunk/src/java/org/apache/hama/http/HttpServer.java

Modified: incubator/hama/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/NOTICE.txt?rev=1140021&r1=1140020&r2=1140021&view=diff
==============================================================================
--- incubator/hama/trunk/NOTICE.txt (original)
+++ incubator/hama/trunk/NOTICE.txt Mon Jun 27 05:27:32 2011
@@ -5,4 +5,7 @@ This product includes software developed
 The Apache Software Foundation (http://www.apache.org/).
 
 This product includes JUnit under the Common Public License Version 1.0
-See http://www.junit.org/
\ No newline at end of file
+See http://www.junit.org/
+
+This product includes SLF4J software developed by QOS.ch. 
+Copyright c 2004-2008 QOS.ch. All rights reserved.
\ No newline at end of file

Modified: incubator/hama/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/pom.xml?rev=1140021&r1=1140020&r2=1140021&view=diff
==============================================================================
--- incubator/hama/trunk/pom.xml (original)
+++ incubator/hama/trunk/pom.xml Mon Jun 27 05:27:32 2011
@@ -88,13 +88,15 @@
   <properties>
     <!-- Dependencies -->
     <commons-logging.version>1.1.1</commons-logging.version>
+    <commons-cli.version>1.2</commons-cli.version>
     <hadoop.version>0.20.2</hadoop.version>
-    <jetty.version>6.1.26</jetty.version>
+    <jetty.version>6.1.4</jetty.version>
     <junit.version>4.8.1</junit.version>
     <slf4j-log4j12.version>1.5.2</slf4j-log4j12.version>
     <servlet-api.version>6.0.32</servlet-api.version>
     <log4j.version>1.2.16</log4j.version>
     <zookeeper.version>3.3.1</zookeeper.version>
+    <ant.version>1.7.1</ant.version>
   </properties>
 
   <dependencies>
@@ -104,15 +106,14 @@
       <version>${commons-logging.version}</version>
     </dependency>
     <dependency>
+      <groupId>commons-cli</groupId>
+      <artifactId>commons-cli</artifactId>
+      <version>${commons-cli.version}</version>
+    </dependency>
+    <dependency>
       <groupId>org.mortbay.jetty</groupId>
       <artifactId>jetty</artifactId>
       <version>${jetty.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>servlet-api</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.tomcat</groupId>
@@ -123,126 +124,41 @@
       <groupId>org.mortbay.jetty</groupId>
       <artifactId>jetty-annotations</artifactId>
       <version>${jetty.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>geronimo-spec</groupId>
-          <artifactId>geronimo-spec-jta</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.geronimo.specs</groupId>
-          <artifactId>geronimo-annotation_1.0_spec</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.mortbay.jetty</groupId>
-      <artifactId>jetty-naming</artifactId>
+      <artifactId>jetty-util</artifactId>
       <version>${jetty.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>javax.mail</groupId>
-          <artifactId>mail</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.mortbay.jetty</groupId>
-      <artifactId>jetty-util</artifactId>
+      <artifactId>jsp-api-2.1</artifactId>
+      <version>${jetty.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jsp-2.1</artifactId>
       <version>${jetty.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>${ant.version}</version>
+    </dependency>    
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant-launcher</artifactId>
+      <version>${ant.version}</version>
+    </dependency>    
+    <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-core</artifactId>
       <version>${hadoop.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>ant</groupId>
-          <artifactId>ant</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>commons-codec</groupId>
-          <artifactId>commons-codec</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>commons-el</groupId>
-          <artifactId>commons-el</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>commons-httpclient</groupId>
-          <artifactId>commons-httpclient</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>commons-net</groupId>
-          <artifactId>commons-net</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.eclipse.jdt</groupId>
-          <artifactId>core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>hsqldb</groupId>
-          <artifactId>hsqldb</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>oro</groupId>
-          <artifactId>oro</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>tomcat</groupId>
-          <artifactId>jasper-runtime</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>tomcat</groupId>
-          <artifactId>jasper-compiler</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>net.java.dev.jets3t</groupId>
-          <artifactId>jets3t</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jsp-api-2.1</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>jsp-2.1</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>servlet-api-2.5</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>xmlenc</groupId>
-          <artifactId>xmlenc</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>net.sf.kosmosfs</groupId>
-          <artifactId>kfs</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-test</artifactId>
       <version>${hadoop.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.ftpserver</groupId>
-          <artifactId>ftplet-api</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.ftpserver</groupId>
-          <artifactId>ftpserver-core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.ftpserver</groupId>
-          <artifactId>ftpserver-deprecated</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.mina</groupId>
-          <artifactId>mina-core</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
@@ -254,53 +170,21 @@
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
       <version>${slf4j-log4j12.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-api</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
       <version>${log4j.version}</version>
       <scope>provided</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>javax.mail</groupId>
-          <artifactId>mail</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.jms</groupId>
-          <artifactId>jms</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.sun.jdmk</groupId>
-          <artifactId>jmxtools</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>com.sun.jmx</groupId>
-          <artifactId>jmxri</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>zookeeper</artifactId>
       <version>${zookeeper.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>jline</groupId>
-          <artifactId>jline</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
   </dependencies>
+  
+  <!-- Builds -->
   <build>
     <sourceDirectory>${source.dir}</sourceDirectory>
     <testSourceDirectory>src/test</testSourceDirectory>
@@ -351,6 +235,7 @@
                   <outputDirectory>${basedir}/lib</outputDirectory>
                   <overWriteReleases>false</overWriteReleases>
                   <overWriteSnapshots>true</overWriteSnapshots>
+                  <excludeTransitive>true</excludeTransitive>
                 </configuration>
               </execution>
             </executions>
@@ -437,4 +322,3 @@
     </profile>
   </profiles>
 </project>
-

Modified: incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java?rev=1140021&r1=1140020&r2=1140021&view=diff
==============================================================================
--- incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java (original)
+++ incubator/hama/trunk/src/examples/org/apache/hama/examples/graph/PageRank.java Mon Jun
27 05:27:32 2011
@@ -177,14 +177,17 @@ public class PageRank extends PageRankBa
   }
 
   public static void printUsage() {
-    LOG.info("PageRank Example:");
-    LOG
-        .info("<damping factor> <epsilon error> <optional: output path>
<optional: input path>");
+    System.out.println("PageRank Example:");
+    System.out
+        .println("<damping factor> <epsilon error> <optional: output path>
<optional: input path>");
   }
 
   public static void main(String[] args) throws IOException,
       InterruptedException, ClassNotFoundException {
-    printUsage();
+    if (args.length == 0) {
+      printUsage();
+      System.exit(-1);
+    }
 
     HamaConfiguration conf = new HamaConfiguration(new Configuration());
     // set the defaults
@@ -192,8 +195,8 @@ public class PageRank extends PageRankBa
     conf.set("epsilon.error", "0.000001");
 
     if (args.length < 2) {
-      LOG.info("You have to provide a damping factor and an error!");
-      LOG.info("Try using 0.85 0.001 as parameter!");
+      System.out.println("You have to provide a damping factor and an error!");
+      System.out.println("Try using 0.85 0.001 as parameter!");
       System.exit(-1);
     } else {
       conf.set("damping.factor", args[0]);

Modified: incubator/hama/trunk/src/java/org/apache/hama/http/HttpServer.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/http/HttpServer.java?rev=1140021&r1=1140020&r2=1140021&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/http/HttpServer.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/http/HttpServer.java Mon Jun 27 05:27:32
2011
@@ -49,7 +49,7 @@ import org.mortbay.jetty.servlet.FilterM
 import org.mortbay.jetty.servlet.ServletHandler;
 import org.mortbay.jetty.servlet.ServletHolder;
 import org.mortbay.jetty.webapp.WebAppContext;
-import org.mortbay.thread.QueuedThreadPool;
+import org.mortbay.thread.BoundedThreadPool;
 import org.mortbay.util.MultiException;
 
 /**
@@ -98,7 +98,7 @@ public class HttpServer {
     listener.setPort(port);
     webServer.addConnector(listener);
 
-    webServer.setThreadPool(new QueuedThreadPool());
+    webServer.setThreadPool(new BoundedThreadPool());
 
     final String appDir = getWebAppsPath();
     ContextHandlerCollection contexts = new ContextHandlerCollection();
@@ -302,7 +302,7 @@ public class HttpServer {
    * Set the min, max number of worker threads (simultaneous connections).
    */
   public void setThreads(int min, int max) {
-    QueuedThreadPool pool = (QueuedThreadPool) webServer.getThreadPool();
+    BoundedThreadPool pool = (BoundedThreadPool) webServer.getThreadPool();
     pool.setMinThreads(min);
     pool.setMaxThreads(max);
   }



Mime
View raw message