hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r779895 - in /hadoop/core/trunk: .eclipse.templates/.classpath CHANGES.txt ivy.xml ivy/libraries.properties lib/commons-cli-2.0-SNAPSHOT.jar src/contrib/streaming/ivy.xml src/core/org/apache/hadoop/util/GenericOptionsParser.java
Date Fri, 29 May 2009 08:36:16 GMT
Author: sharad
Date: Fri May 29 08:36:15 2009
New Revision: 779895

URL: http://svn.apache.org/viewvc?rev=779895&view=rev
Log:
HADOOP-5896. Remove the dependency of GenericOptionsParser on Option.withArgPattern. Contributed
by Giridharan Kesavan and Sharad Agarwal.

Removed:
    hadoop/core/trunk/lib/commons-cli-2.0-SNAPSHOT.jar
Modified:
    hadoop/core/trunk/.eclipse.templates/.classpath
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/ivy.xml
    hadoop/core/trunk/ivy/libraries.properties
    hadoop/core/trunk/src/contrib/streaming/ivy.xml
    hadoop/core/trunk/src/core/org/apache/hadoop/util/GenericOptionsParser.java

Modified: hadoop/core/trunk/.eclipse.templates/.classpath
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/.eclipse.templates/.classpath?rev=779895&r1=779894&r2=779895&view=diff
==============================================================================
--- hadoop/core/trunk/.eclipse.templates/.classpath (original)
+++ hadoop/core/trunk/.eclipse.templates/.classpath Fri May 29 08:36:15 2009
@@ -14,7 +14,6 @@
 	<classpathentry kind="src" path="src/contrib/streaming/src/test"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="var" path="ANT_HOME/lib/ant.jar"/>
-	<classpathentry kind="lib" path="lib/commons-cli-2.0-SNAPSHOT.jar"/>
 	<classpathentry kind="lib" path="lib/hsqldb-1.8.0.10.jar"/>
 	<classpathentry kind="lib" path="lib/kfs-0.2.2.jar"/>
 	<classpathentry kind="lib" path="lib/jsp-2.1/jsp-2.1.jar"/>
@@ -38,6 +37,8 @@
 	<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/slf4j-api-1.4.3.jar"/>
 	<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/slf4j-log4j12-1.4.3.jar"/>
 	<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/xmlenc-0.52.jar"/>
+	<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/commons-cli-1.2.jar"/>
+	<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/commons-cli-2.0-mahout.jar"/>
 	<classpathentry kind="lib" path="src/test/lib/ftplet-api-1.0.0-SNAPSHOT.jar"/>
 	<classpathentry kind="lib" path="src/test/lib/ftpserver-core-1.0.0-SNAPSHOT.jar"/>
 	<classpathentry kind="lib" path="src/test/lib/ftpserver-server-1.0.0-SNAPSHOT.jar"/>

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=779895&r1=779894&r2=779895&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri May 29 08:36:15 2009
@@ -404,6 +404,10 @@
     HADOOP-5664. Change map serialization so a lock is obtained only where
     contention is possible, rather than for each write. (cdouglas)
 
+    HADOOP-5896. Remove the dependency of GenericOptionsParser on 
+    Option.withArgPattern. (Giridharan Kesavan and Sharad Agarwal via 
+    sharad)
+
   OPTIMIZATIONS
 
     HADOOP-5595. NameNode does not need to run a replicator to choose a

Modified: hadoop/core/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/ivy.xml?rev=779895&r1=779894&r2=779895&view=diff
==============================================================================
--- hadoop/core/trunk/ivy.xml (original)
+++ hadoop/core/trunk/ivy.xml Fri May 29 08:36:15 2009
@@ -78,13 +78,14 @@
     <artifact conf="master"/>
   </publications>
   <dependencies>
-
- <!--used client side-->
-<!--  <dependency org="commons-cli"
-    name="commons-cli"
-    rev="${commons-cli.version}"
-    conf="client->default"/> -->
-
+    <dependency org="org.apache.mahout.commons"
+      name="commons-cli"
+      rev="${commons-cli2.version}"
+      conf="common->default"/>
+    <dependency org="commons-cli"
+      name="commons-cli"
+      rev="${commons-cli.version}"
+      conf="common->default"/>
     <dependency org="checkstyle"
       name="checkstyle"
       rev="${checkstyle.version}"
@@ -98,7 +99,6 @@
       rev="${xerces.version}"
       conf="jdiff->default">
     </dependency>
-
     <dependency org="xmlenc"
       name="xmlenc"
       rev="${xmlenc.version}"

Modified: hadoop/core/trunk/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/ivy/libraries.properties?rev=779895&r1=779894&r2=779895&view=diff
==============================================================================
--- hadoop/core/trunk/ivy/libraries.properties (original)
+++ hadoop/core/trunk/ivy/libraries.properties Fri May 29 08:36:15 2009
@@ -18,7 +18,8 @@
 
 checkstyle.version=4.2
 
-commons-cli.version=2.0-SNAPSHOT
+commons-cli.version=1.2
+commons-cli2.version=2.0-mahout
 commons-codec.version=1.3
 commons-collections.version=3.1
 commons-httpclient.version=3.0.1

Modified: hadoop/core/trunk/src/contrib/streaming/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/contrib/streaming/ivy.xml?rev=779895&r1=779894&r2=779895&view=diff
==============================================================================
--- hadoop/core/trunk/src/contrib/streaming/ivy.xml (original)
+++ hadoop/core/trunk/src/contrib/streaming/ivy.xml Fri May 29 08:36:15 2009
@@ -24,6 +24,10 @@
     <artifact conf="master"/>
   </publications>
   <dependencies>
+    <dependency org="org.apache.mahout.commons"
+      name="commons-cli"
+      rev="${commons-cli2.version}"
+      conf="common->default"/>
     <dependency org="commons-logging"
       name="commons-logging"
       rev="${commons-logging.version}"

Modified: hadoop/core/trunk/src/core/org/apache/hadoop/util/GenericOptionsParser.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/util/GenericOptionsParser.java?rev=779895&r1=779894&r2=779895&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/util/GenericOptionsParser.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/util/GenericOptionsParser.java Fri May 29
08:36:15 2009
@@ -205,8 +205,7 @@
     .withDescription("specify an application configuration file")
     .create("conf");
     Option property = OptionBuilder.withArgName("property=value")
-    .hasArgs()
-    .withArgPattern("=", 1)
+    .hasArg()
     .withDescription("use value for given property")
     .create('D');
     Option libjars = OptionBuilder.withArgName("paths")
@@ -281,9 +280,11 @@
     }
     if (line.hasOption('D')) {
       String[] property = line.getOptionValues('D');
-      for(int i=0; i<property.length-1; i=i+2) {
-        if (property[i]!=null)
-          conf.set(property[i], property[i+1]);
+      for(String prop : property) {
+        String[] keyval = prop.split("=");
+        if (keyval.length == 2) {
+          conf.set(keyval[0], keyval[1]);
+        }
       }
     }
     conf.setBoolean("mapred.used.genericoptionsparser", true);



Mime
View raw message