hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject svn commit: r536239 - in /lucene/hadoop/trunk: ./ src/java/org/apache/hadoop/mapred/lib/aggregate/ src/test/org/apache/hadoop/fs/
Date Tue, 08 May 2007 16:12:57 GMT
Author: tomwhite
Date: Tue May  8 09:12:56 2007
New Revision: 536239

URL: http://svn.apache.org/viewvc?view=rev&rev=536239
Log:
HADOOP-1310.  Fix unchecked warnings in aggregate code.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UniqValueCount.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UserDefinedValueAggregatorDescriptor.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueAggregatorJob.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueHistogram.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/DFSCIOTest.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestDFSIO.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=536239&r1=536238&r2=536239
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue May  8 09:12:56 2007
@@ -360,6 +360,8 @@
      generates it rather than the entire task tracker.
      (Arun C Murthy via cutting)
 
+107. HADOOP-1310.  Fix unchecked warnings in aggregate code.  (tomwhite)
+
 
 Release 0.12.3 - 2007-04-06
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UniqValueCount.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UniqValueCount.java?view=diff&rev=536239&r1=536238&r2=536239
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UniqValueCount.java
(original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UniqValueCount.java
Tue May  8 09:12:56 2007
@@ -29,14 +29,14 @@
  */
 public class UniqValueCount implements ValueAggregator {
 
-  TreeMap uniqItems = null;
+  TreeMap<Object, Object> uniqItems = null;
 
   /**
    * the default constructor
    * 
    */
   public UniqValueCount() {
-    uniqItems = new TreeMap();
+    uniqItems = new TreeMap<Object, Object>();
   }
 
   /**
@@ -70,7 +70,7 @@
    * reset the aggregator
    */
   public void reset() {
-    uniqItems = new TreeMap();
+    uniqItems = new TreeMap<Object, Object>();
   }
 
   /**
@@ -80,7 +80,7 @@
   public ArrayList getCombinerOutput() {
     Object key = null;
     Iterator iter = uniqItems.keySet().iterator();
-    ArrayList retv = new ArrayList();
+    ArrayList<Object> retv = new ArrayList<Object>();
 
     while (iter.hasNext()) {
       key = iter.next();

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UserDefinedValueAggregatorDescriptor.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UserDefinedValueAggregatorDescriptor.java?view=diff&rev=536239&r1=536238&r2=536239
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UserDefinedValueAggregatorDescriptor.java
(original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/UserDefinedValueAggregatorDescriptor.java
Tue May  8 09:12:56 2007
@@ -48,7 +48,7 @@
     Object retv = null;
     try {
       ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-      Class theFilterClass = Class.forName(className, true, classLoader);
+      Class<?> theFilterClass = Class.forName(className, true, classLoader);
       Constructor meth = theFilterClass.getDeclaredConstructor(argArray);
       meth.setAccessible(true);
       retv = meth.newInstance();

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueAggregatorJob.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueAggregatorJob.java?view=diff&rev=536239&r1=536238&r2=536239
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueAggregatorJob.java
(original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueAggregatorJob.java
Tue May  8 09:12:56 2007
@@ -24,6 +24,7 @@
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
+import org.apache.hadoop.mapred.InputFormat;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.SequenceFileInputFormat;
 import org.apache.hadoop.mapred.TextInputFormat;
@@ -111,7 +112,8 @@
       numOfReducers = Integer.parseInt(args[2]);
     }
 
-    Class theInputFormat = SequenceFileInputFormat.class;
+    Class<? extends InputFormat> theInputFormat =
+      SequenceFileInputFormat.class;
     if (args.length > 3 && args[3].compareToIgnoreCase("textinputformat") == 0)
{
       theInputFormat = TextInputFormat.class;
     }

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueHistogram.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueHistogram.java?view=diff&rev=536239&r1=536238&r2=536239
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueHistogram.java
(original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/lib/aggregate/ValueHistogram.java
Tue May  8 09:12:56 2007
@@ -33,10 +33,10 @@
  */
 public class ValueHistogram implements ValueAggregator {
 
-  TreeMap items = null;
+  TreeMap<Object, Object> items = null;
 
   public ValueHistogram() {
-    items = new TreeMap();
+    items = new TreeMap<Object, Object>();
   }
 
   /**
@@ -150,7 +150,7 @@
    *  The return value is expected to be used by the reducer.
    */
   public ArrayList getCombinerOutput() {
-    ArrayList retv = new ArrayList();
+    ArrayList<String> retv = new ArrayList<String>();
     Iterator iter = items.entrySet().iterator();
 
     while (iter.hasNext()) {
@@ -174,7 +174,7 @@
    * reset the aggregator
    */
   public void reset() {
-    items = new TreeMap();
+    items = new TreeMap<Object, Object>();
   }
 
 }

Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/DFSCIOTest.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/DFSCIOTest.java?view=diff&rev=536239&r1=536238&r2=536239
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/DFSCIOTest.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/DFSCIOTest.java Tue May  8 09:12:56
2007
@@ -264,7 +264,7 @@
     runIOTest(WriteMapper.class, WRITE_DIR);
   }
   
-  private static void runIOTest( Class mapperClass, 
+  private static void runIOTest( Class<? extends Mapper> mapperClass, 
                                  Path outputDir
                                  ) throws IOException {
     JobConf job = new JobConf(fsConfig, DFSCIOTest.class);

Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestDFSIO.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestDFSIO.java?view=diff&rev=536239&r1=536238&r2=536239
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestDFSIO.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestDFSIO.java Tue May  8 09:12:56 2007
@@ -219,7 +219,7 @@
     runIOTest(WriteMapper.class, WRITE_DIR);
   }
   
-  private static void runIOTest( Class mapperClass, 
+  private static void runIOTest( Class<? extends Mapper> mapperClass, 
                                  Path outputDir
                                  ) throws IOException {
     JobConf job = new JobConf(fsConfig, TestDFSIO.class);



Mime
View raw message