hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r510211 - in /lucene/hadoop/trunk: CHANGES.txt src/test/org/apache/hadoop/io/TestArrayFile.java src/test/org/apache/hadoop/io/TestSequenceFile.java src/test/org/apache/hadoop/io/TestSetFile.java
Date Wed, 21 Feb 2007 21:05:49 GMT
Author: cutting
Date: Wed Feb 21 13:05:48 2007
New Revision: 510211

URL: http://svn.apache.org/viewvc?view=rev&rev=510211
Log:
HADOOP-1006.  Remove obsolete '-local' option from test code.  Contributed by Gautam Kowshik.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=510211&r1=510210&r2=510211
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Feb 21 13:05:48 2007
@@ -86,6 +86,9 @@
     directly, so that user code is no longer required in the
     JobTracker.  (omalley via cutting)
 
+26. HAOOP-1006.  Remove obsolete '-local' option from test code.
+    (Gautam Kowshik via cutting)
+
 
 Release 0.11.2 - 2007-02-16
 

Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java?view=diff&rev=510211&r1=510210&r2=510211
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestArrayFile.java Wed Feb 21 13:05:48
2007
@@ -104,7 +104,7 @@
     boolean create = true;
     boolean check = true;
     String file = FILE;
-    String usage = "Usage: TestArrayFile (-local | -dfs <namenode:port>) [-count N]
[-nocreate] [-nocheck] file";
+    String usage = "Usage: TestArrayFile [-count N] [-nocreate] [-nocheck] file";
       
     if (args.length == 0) {
       System.err.println(usage);
@@ -113,7 +113,8 @@
 
     Configuration conf = new Configuration();
     int i = 0;
-    FileSystem fs = FileSystem.parseArgs(args, i, conf);
+    Path fpath = null;
+    FileSystem fs = null;
     try {
         for (; i < args.length; i++) {       // parse command line
             if (args[i] == null) {
@@ -127,9 +128,12 @@
             } else {                                       
                 // file is required parameter
                 file = args[i];
+                fpath=new Path(file);
             }
         }
-
+        
+        fs = fpath.getFileSystem(conf);
+        
         LOG.info("count = " + count);
         LOG.info("create = " + create);
         LOG.info("check = " + check);

Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java?view=diff&rev=510211&r1=510210&r2=510211
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSequenceFile.java Wed Feb 21 13:05:48
2007
@@ -417,7 +417,7 @@
     Path file = null;
     int seed = new Random().nextInt();
 
-    String usage = "Usage: SequenceFile (-local | -dfs <namenode:port>) " +
+    String usage = "Usage: SequenceFile " +
         "[-count N] " + 
         "[-seed #] [-check] [-compressType <NONE|RECORD|BLOCK>] " + 
         "-codec <compressionCodec> " + 
@@ -428,7 +428,7 @@
         System.exit(-1);
     }
     
-    FileSystem fs = FileSystem.parseArgs(args, 0, conf);      
+    FileSystem fs = null;
     try {
       for (int i=0; i < args.length; ++i) {       // parse command line
           if (args[i] == null) {
@@ -460,6 +460,9 @@
               file = new Path(args[i]);
           }
         }
+        
+      	fs = file.getFileSystem(conf);
+
         LOG.info("count = " + count);
         LOG.info("megabytes = " + megabytes);
         LOG.info("factor = " + factor);

Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java?view=diff&rev=510211&r1=510210&r2=510211
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/io/TestSetFile.java Wed Feb 21 13:05:48
2007
@@ -103,7 +103,7 @@
     String file = FILE;
     String compress = "NONE";
 
-    String usage = "Usage: TestSetFile (-local | -dfs <namenode:port>) [-count N] [-nocreate]
[-nocheck] [-compress type] file";
+    String usage = "Usage: TestSetFile [-count N] [-nocreate] [-nocheck] [-compress type]
file";
       
     if (args.length == 0) {
       System.err.println(usage);
@@ -111,7 +111,8 @@
     }
       
     int i = 0;
-    FileSystem fs = FileSystem.parseArgs(args, i, conf);      
+    Path fpath=null;
+    FileSystem fs = null;    
     try {
       for (; i < args.length; i++) {       // parse command line
         if (args[i] == null) {
@@ -127,9 +128,12 @@
         } else {
           // file is required parameter
           file = args[i];
+          fpath=new Path(file);
         }
       }
-
+      
+      fs = fpath.getFileSystem(conf);
+      
       LOG.info("count = " + count);
       LOG.info("create = " + create);
       LOG.info("check = " + check);



Mime
View raw message