incubator-crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwi...@apache.org
Subject [3/4] Cleanup a bunch of compiler warnings, mostly by adding serialVersionUIDs to DoFn and friends
Date Tue, 19 Jun 2012 03:09:19 GMT
http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/PTypeFamily.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/PTypeFamily.java b/src/main/java/com/cloudera/crunch/types/PTypeFamily.java
index 981e6c3..3ab9d94 100644
--- a/src/main/java/com/cloudera/crunch/types/PTypeFamily.java
+++ b/src/main/java/com/cloudera/crunch/types/PTypeFamily.java
@@ -62,9 +62,9 @@ public interface PTypeFamily {
   <V1, V2, V3, V4> PType<Tuple4<V1, V2, V3, V4>> quads(PType<V1>
p1,
       PType<V2> p2, PType<V3> p3, PType<V4> p4);
 
-  PType<TupleN> tuples(PType... ptypes);
+  PType<TupleN> tuples(PType<?>... ptypes);
 
-  <T extends Tuple> PType<T> tuples(Class<T> clazz, PType... ptypes);
+  <T extends Tuple> PType<T> tuples(Class<T> clazz, PType<?>... ptypes);
   
   <S, T> PType<T> derived(Class<T> clazz, MapFn<S, T> inputFn, MapFn<T,
S> outputFn, PType<S> base);
   

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/TupleFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/TupleFactory.java b/src/main/java/com/cloudera/crunch/types/TupleFactory.java
index 3829625..5d967cc 100644
--- a/src/main/java/com/cloudera/crunch/types/TupleFactory.java
+++ b/src/main/java/com/cloudera/crunch/types/TupleFactory.java
@@ -25,6 +25,7 @@ import com.cloudera.crunch.TupleN;
 import com.cloudera.crunch.impl.mr.run.CrunchRuntimeException;
 
 public abstract class TupleFactory<T extends Tuple> implements Serializable {
+  private static final long serialVersionUID = 1L;
   
   public void initialize() { }
   

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/avro/AvroGroupedTableType.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/avro/AvroGroupedTableType.java b/src/main/java/com/cloudera/crunch/types/avro/AvroGroupedTableType.java
index 020c129..091948e 100644
--- a/src/main/java/com/cloudera/crunch/types/avro/AvroGroupedTableType.java
+++ b/src/main/java/com/cloudera/crunch/types/avro/AvroGroupedTableType.java
@@ -16,12 +16,10 @@ package com.cloudera.crunch.types.avro;
 
 import java.util.Collection;
 
-import com.cloudera.crunch.types.Converter;
 import org.apache.avro.mapred.AvroJob;
 import org.apache.avro.mapred.AvroKey;
 import org.apache.avro.mapred.AvroKeyComparator;
 import org.apache.avro.mapred.AvroValue;
-import org.apache.avro.specific.SpecificRecord;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.mapreduce.Job;
 

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/avro/AvroKeyConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/avro/AvroKeyConverter.java b/src/main/java/com/cloudera/crunch/types/avro/AvroKeyConverter.java
index fde7219..af2c968 100644
--- a/src/main/java/com/cloudera/crunch/types/avro/AvroKeyConverter.java
+++ b/src/main/java/com/cloudera/crunch/types/avro/AvroKeyConverter.java
@@ -20,6 +20,8 @@ import org.apache.hadoop.io.NullWritable;
 import com.cloudera.crunch.types.Converter;
 
 public class AvroKeyConverter<K> implements Converter<AvroWrapper<K>, NullWritable,
K, Iterable<K>> {
+  private static final long serialVersionUID = 1L;
+  
   private transient AvroWrapper<K> wrapper = null;
   
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/avro/AvroPairConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/avro/AvroPairConverter.java b/src/main/java/com/cloudera/crunch/types/avro/AvroPairConverter.java
index fd3aa09..6e8af5c 100644
--- a/src/main/java/com/cloudera/crunch/types/avro/AvroPairConverter.java
+++ b/src/main/java/com/cloudera/crunch/types/avro/AvroPairConverter.java
@@ -16,7 +16,6 @@ package com.cloudera.crunch.types.avro;
 
 import java.util.Iterator;
 
-import com.cloudera.crunch.types.Converter;
 import org.apache.avro.mapred.AvroKey;
 import org.apache.avro.mapred.AvroValue;
 
@@ -24,7 +23,8 @@ import com.cloudera.crunch.Pair;
 import com.cloudera.crunch.types.Converter;
 
 public class AvroPairConverter<K, V> implements Converter<AvroKey<K>, AvroValue<V>,
Pair<K, V>, Pair<K, Iterable<V>>> {
-
+  private static final long serialVersionUID = 1L;
+  
   private transient AvroKey<K> keyWrapper = null;
   private transient AvroValue<V> valueWrapper = null;
   

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/avro/AvroTypeFamily.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/avro/AvroTypeFamily.java b/src/main/java/com/cloudera/crunch/types/avro/AvroTypeFamily.java
index f21bbeb..852622b 100644
--- a/src/main/java/com/cloudera/crunch/types/avro/AvroTypeFamily.java
+++ b/src/main/java/com/cloudera/crunch/types/avro/AvroTypeFamily.java
@@ -18,10 +18,6 @@ import java.nio.ByteBuffer;
 import java.util.Collection;
 import java.util.Map;
 
-import com.cloudera.crunch.types.PTableType;
-import com.cloudera.crunch.types.PType;
-import com.cloudera.crunch.types.PTypeFamily;
-import com.cloudera.crunch.types.PTypeUtils;
 import org.apache.avro.Schema;
 import org.apache.avro.generic.GenericData;
 
@@ -131,7 +127,7 @@ public class AvroTypeFamily implements PTypeFamily {
   }
 
   @Override
-  public PType<TupleN> tuples(PType... ptypes) {
+  public PType<TupleN> tuples(PType<?>... ptypes) {
     return Avros.tuples(ptypes);
   }
 
@@ -158,7 +154,7 @@ public class AvroTypeFamily implements PTypeFamily {
   }
 
   @Override
-  public <T extends Tuple> PType<T> tuples(Class<T> clazz, PType... ptypes)
{
+  public <T extends Tuple> PType<T> tuples(Class<T> clazz, PType<?>...
ptypes) {
     return Avros.tuples(clazz, ptypes);
   }
 
@@ -167,6 +163,4 @@ public class AvroTypeFamily implements PTypeFamily {
       MapFn<T, S> outputFn, PType<S> base) {
     return Avros.derived(clazz, inputFn, outputFn, base);
   }
-
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/avro/Avros.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/avro/Avros.java b/src/main/java/com/cloudera/crunch/types/avro/Avros.java
index 1d16e93..e5573e8 100644
--- a/src/main/java/com/cloudera/crunch/types/avro/Avros.java
+++ b/src/main/java/com/cloudera/crunch/types/avro/Avros.java
@@ -80,6 +80,7 @@ public class Avros {
   }
   
   public static MapFn<CharSequence, String> UTF8_TO_STRING = new MapFn<CharSequence,
String>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public String map(CharSequence input) {
       return input.toString();
@@ -87,6 +88,7 @@ public class Avros {
   };
   
   public static MapFn<String, Utf8> STRING_TO_UTF8 = new MapFn<String, Utf8>()
{
+    private static final long serialVersionUID = 1L;
     @Override
     public Utf8 map(String input) {
       return new Utf8(input);
@@ -94,6 +96,7 @@ public class Avros {
   };
 
   public static MapFn<Object, ByteBuffer> BYTES_IN = new MapFn<Object, ByteBuffer>()
{
+    private static final long serialVersionUID = 1L;
 	@Override
 	public ByteBuffer map(Object input) {
 	  if (input instanceof ByteBuffer) {
@@ -114,7 +117,7 @@ public class Avros {
   private static final AvroType<ByteBuffer> bytes = new AvroType<ByteBuffer>(
 	  ByteBuffer.class, Schema.create(Schema.Type.BYTES), BYTES_IN, IdentityFn.getInstance());
   
-  private static final Map<Class, PType> PRIMITIVES = ImmutableMap.<Class, PType>builder()
+  private static final Map<Class<?>, PType<?>> PRIMITIVES = ImmutableMap.<Class<?>,
PType<?>>builder()
       .put(String.class, strings)
       .put(Long.class, longs)
       .put(Integer.class, ints)
@@ -124,14 +127,14 @@ public class Avros {
       .put(ByteBuffer.class, bytes)
       .build();
   
-  private static final Map<Class, AvroType> EXTENSIONS = Maps.newHashMap();
+  private static final Map<Class<?>, AvroType<?>> EXTENSIONS = Maps.newHashMap();
   
   public static <T> void register(Class<T> clazz, AvroType<T> ptype) {
     EXTENSIONS.put(clazz, ptype);
   }
   
   public static <T> PType<T> getPrimitiveType(Class<T> clazz) {
-    return PRIMITIVES.get(clazz);
+    return (PType<T>) PRIMITIVES.get(clazz);
   }
   
   private static <T> AvroType<T> create(Class<T> clazz, Schema.Type schemaType)
{
@@ -190,6 +193,7 @@ public class Avros {
   }
   
   private static class BytesToWritableMapFn<T extends Writable> extends MapFn<ByteBuffer,
T> {
+    private static final long serialVersionUID = 1L;
     private static final Log LOG = LogFactory.getLog(BytesToWritableMapFn.class);
     
     private final Class<T> writableClazz;
@@ -212,6 +216,7 @@ public class Avros {
   }
   
   private static class WritableToBytesMapFn<T extends Writable> extends MapFn<T,
ByteBuffer> {
+    private static final long serialVersionUID = 1L;
     private static final Log LOG = LogFactory.getLog(WritableToBytesMapFn.class);
     
     @Override
@@ -233,7 +238,8 @@ public class Avros {
   }
   
   private static class GenericDataArrayToCollection extends MapFn<Object, Collection>
{
-    
+    private static final long serialVersionUID = 1L;
+
     private final MapFn mapFn;
     
     public GenericDataArrayToCollection(MapFn mapFn) {
@@ -274,6 +280,7 @@ public class Avros {
   }
   
   private static class CollectionToGenericDataArray extends MapFn<Collection, GenericData.Array>
{
+    private static final long serialVersionUID = 1L;
     
     private final MapFn mapFn;
     private final String jsonSchema;
@@ -321,6 +328,7 @@ public class Avros {
   }
 
   private static class AvroMapToMap<T> extends MapFn<Map<CharSequence, Object>,
Map<String, T>> {
+    private static final long serialVersionUID = 1L;
 	private final MapFn<Object, T> mapFn;
 	
 	public AvroMapToMap(MapFn<Object, T> mapFn) {
@@ -353,6 +361,7 @@ public class Avros {
   }
   
   private static class MapToAvroMap<T> extends MapFn<Map<String, T>, Map<Utf8,
Object>> {
+    private static final long serialVersionUID = 1L;
 	private final MapFn<T, Object> mapFn;
 	
 	public MapToAvroMap(MapFn<T, Object> mapFn) {
@@ -393,15 +402,16 @@ public class Avros {
   }
   
   private static class GenericRecordToTuple extends MapFn<GenericRecord, Tuple> {
-    private final TupleFactory tupleFactory;
+    private static final long serialVersionUID = 1L;
+    private final TupleFactory<?> tupleFactory;
     private final List<MapFn> fns;
     
     private transient Object[] values;
     
-    public GenericRecordToTuple(TupleFactory tupleFactory, PType... ptypes) {
+    public GenericRecordToTuple(TupleFactory<?> tupleFactory, PType<?>... ptypes)
{
       this.tupleFactory = tupleFactory;
       this.fns = Lists.newArrayList();
-      for (PType ptype : ptypes) {
+      for (PType<?> ptype : ptypes) {
         AvroType atype = (AvroType) ptype;
         fns.add(atype.getInputMapFn());
       }
@@ -445,12 +455,13 @@ public class Avros {
   }
   
   private static class TupleToGenericRecord extends MapFn<Tuple, GenericRecord> {
+    private static final long serialVersionUID = 1L;
     private final List<MapFn> fns;
     private final String jsonSchema;
     
     private transient GenericRecord record;
     
-    public TupleToGenericRecord(Schema schema, PType... ptypes) {
+    public TupleToGenericRecord(Schema schema, PType<?>... ptypes) {
       this.fns = Lists.newArrayList();
       this.jsonSchema = schema.toString();
       for (PType ptype : ptypes) {
@@ -539,7 +550,7 @@ public class Avros {
         ptypes);  
   }
   
-  private static Schema createTupleSchema(PType... ptypes) {
+  private static Schema createTupleSchema(PType<?>... ptypes) {
 	// Guarantee each tuple schema has a globally unique name
 	String tupleName = "tuple" + UUID.randomUUID().toString().replace('-', 'x');
     Schema schema = Schema.createRecord(tupleName, "", "crunch", false);

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/writable/WritableGroupedTableType.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/writable/WritableGroupedTableType.java
b/src/main/java/com/cloudera/crunch/types/writable/WritableGroupedTableType.java
index cd202ca..87f222d 100644
--- a/src/main/java/com/cloudera/crunch/types/writable/WritableGroupedTableType.java
+++ b/src/main/java/com/cloudera/crunch/types/writable/WritableGroupedTableType.java
@@ -14,7 +14,6 @@
  */
 package com.cloudera.crunch.types.writable;
 
-import com.cloudera.crunch.types.Converter;
 import org.apache.hadoop.mapreduce.Job;
 
 import com.cloudera.crunch.GroupingOptions;

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/writable/WritablePairConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/writable/WritablePairConverter.java b/src/main/java/com/cloudera/crunch/types/writable/WritablePairConverter.java
index ada5739..1f66adf 100644
--- a/src/main/java/com/cloudera/crunch/types/writable/WritablePairConverter.java
+++ b/src/main/java/com/cloudera/crunch/types/writable/WritablePairConverter.java
@@ -16,10 +16,10 @@ package com.cloudera.crunch.types.writable;
 
 import com.cloudera.crunch.Pair;
 import com.cloudera.crunch.types.Converter;
-import com.cloudera.crunch.types.Converter;
 
 public class WritablePairConverter<K, V> implements Converter<K, V, Pair<K, V>,
Pair<K, Iterable<V>>> {
-
+  private static final long serialVersionUID = 1L;
+  
   private final Class<K> keyClass;
   private final Class<V> valueClass;
   

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/writable/WritableTypeFamily.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/writable/WritableTypeFamily.java b/src/main/java/com/cloudera/crunch/types/writable/WritableTypeFamily.java
index 8a51e9a..1b682b0 100644
--- a/src/main/java/com/cloudera/crunch/types/writable/WritableTypeFamily.java
+++ b/src/main/java/com/cloudera/crunch/types/writable/WritableTypeFamily.java
@@ -47,12 +47,6 @@ public class WritableTypeFamily implements PTypeFamily {
   private WritableTypeFamily() {
   }
 
-  private static <S, W extends Writable> WritableType<S, W> create(Class<S>
typeClass,
-      Class<W> writableClass, MapFn<W, S> inputDoFn, MapFn<S, W> outputDoFn)
{
-    return new WritableType<S, W>(typeClass, writableClass, inputDoFn,
-        outputDoFn);
-  }
-
   public PType<Void> nulls() {
     return Writables.nulls();
   }
@@ -111,7 +105,7 @@ public class WritableTypeFamily implements PTypeFamily {
     return Writables.quads(p1, p2, p3, p4);
   }
 
-  public PType<TupleN> tuples(PType... ptypes) {
+  public PType<TupleN> tuples(PType<?>... ptypes) {
     return Writables.tuples(ptypes);
   }
 
@@ -141,7 +135,7 @@ public class WritableTypeFamily implements PTypeFamily {
   }
 
   @Override
-  public <T extends Tuple> PType<T> tuples(Class<T> clazz, PType... ptypes)
{
+  public <T extends Tuple> PType<T> tuples(Class<T> clazz, PType<?>...
ptypes) {
     return Writables.tuples(clazz, ptypes);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/writable/WritableValueConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/writable/WritableValueConverter.java
b/src/main/java/com/cloudera/crunch/types/writable/WritableValueConverter.java
index acda315..6f49b88 100644
--- a/src/main/java/com/cloudera/crunch/types/writable/WritableValueConverter.java
+++ b/src/main/java/com/cloudera/crunch/types/writable/WritableValueConverter.java
@@ -20,7 +20,8 @@ import org.apache.hadoop.io.NullWritable;
 import com.cloudera.crunch.types.Converter;
 
 class WritableValueConverter<W> implements Converter<Object, W, W, Iterable<W>>
{
-
+  private static final long serialVersionUID = 1L;
+  
   private final Class<W> serializationClass;
   
   public WritableValueConverter(Class<W> serializationClass) {

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/types/writable/Writables.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/types/writable/Writables.java b/src/main/java/com/cloudera/crunch/types/writable/Writables.java
index 060f411..1b73f2d 100644
--- a/src/main/java/com/cloudera/crunch/types/writable/Writables.java
+++ b/src/main/java/com/cloudera/crunch/types/writable/Writables.java
@@ -53,6 +53,7 @@ import com.google.common.collect.Maps;
  */
 public class Writables {
   private static final MapFn<NullWritable, Void> NULL_WRITABLE_TO_VOID = new MapFn<NullWritable,
Void>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public Void map(NullWritable input) {
       return null;
@@ -60,6 +61,7 @@ public class Writables {
   };
 
   private static final MapFn<Void, NullWritable> VOID_TO_NULL_WRITABLE = new MapFn<Void,
NullWritable>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public NullWritable map(Void input) {
       return NullWritable.get();
@@ -67,6 +69,7 @@ public class Writables {
   };
   
   private static final MapFn<Text, String> TEXT_TO_STRING = new MapFn<Text, String>()
{
+    private static final long serialVersionUID = 1L;
     @Override
     public String map(Text input) {
       return input.toString();
@@ -74,6 +77,7 @@ public class Writables {
   };
 
   private static final MapFn<String, Text> STRING_TO_TEXT = new MapFn<String, Text>()
{
+    private static final long serialVersionUID = 1L;
     @Override
     public Text map(String input) {
       return new Text(input);
@@ -81,6 +85,7 @@ public class Writables {
   };
 
   private static final MapFn<IntWritable, Integer> IW_TO_INT = new MapFn<IntWritable,
Integer>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public Integer map(IntWritable input) {
       return input.get();
@@ -88,6 +93,7 @@ public class Writables {
   };
 
   private static final MapFn<Integer, IntWritable> INT_TO_IW = new MapFn<Integer,
IntWritable>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public IntWritable map(Integer input) {
       return new IntWritable(input);
@@ -95,6 +101,7 @@ public class Writables {
   };
 
   private static final MapFn<LongWritable, Long> LW_TO_LONG = new MapFn<LongWritable,
Long>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public Long map(LongWritable input) {
       return input.get();
@@ -102,6 +109,7 @@ public class Writables {
   };
 
   private static final MapFn<Long, LongWritable> LONG_TO_LW = new MapFn<Long, LongWritable>()
{
+    private static final long serialVersionUID = 1L;
     @Override
     public LongWritable map(Long input) {
       return new LongWritable(input);
@@ -109,6 +117,7 @@ public class Writables {
   };
 
   private static final MapFn<FloatWritable, Float> FW_TO_FLOAT = new MapFn<FloatWritable,
Float>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public Float map(FloatWritable input) {
       return input.get();
@@ -116,6 +125,7 @@ public class Writables {
   };
 
   private static final MapFn<Float, FloatWritable> FLOAT_TO_FW = new MapFn<Float,
FloatWritable>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public FloatWritable map(Float input) {
       return new FloatWritable(input);
@@ -123,6 +133,7 @@ public class Writables {
   };
 
   private static final MapFn<DoubleWritable, Double> DW_TO_DOUBLE = new MapFn<DoubleWritable,
Double>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public Double map(DoubleWritable input) {
       return input.get();
@@ -130,6 +141,7 @@ public class Writables {
   };
 
   private static final MapFn<Double, DoubleWritable> DOUBLE_TO_DW = new MapFn<Double,
DoubleWritable>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public DoubleWritable map(Double input) {
       return new DoubleWritable(input);
@@ -137,6 +149,7 @@ public class Writables {
   };
 
   private static final MapFn<BooleanWritable, Boolean> BW_TO_BOOLEAN = new MapFn<BooleanWritable,
Boolean>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public Boolean map(BooleanWritable input) {
       return input.get();
@@ -146,6 +159,7 @@ public class Writables {
   private static final BooleanWritable TRUE = new BooleanWritable(true);
   private static final BooleanWritable FALSE = new BooleanWritable(false);
   private static final MapFn<Boolean, BooleanWritable> BOOLEAN_TO_BW = new MapFn<Boolean,
BooleanWritable>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public BooleanWritable map(Boolean input) {
       return input == Boolean.TRUE ? TRUE : FALSE;
@@ -153,13 +167,15 @@ public class Writables {
   };
   
   private static final MapFn<BytesWritable, ByteBuffer> BW_TO_BB = new MapFn<BytesWritable,
ByteBuffer>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public ByteBuffer map(BytesWritable input) {
       return ByteBuffer.wrap(input.getBytes(), 0, input.getLength());
     }
   };
   
-  private static final MapFn<ByteBuffer, BytesWritable> BB_TO_BW = new MapFn<ByteBuffer,
BytesWritable>() {    
+  private static final MapFn<ByteBuffer, BytesWritable> BB_TO_BW = new MapFn<ByteBuffer,
BytesWritable>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public BytesWritable map(ByteBuffer input) {
       BytesWritable bw = new BytesWritable();
@@ -191,7 +207,7 @@ public class Writables {
   private static final WritableType<ByteBuffer, BytesWritable> bytes = create(ByteBuffer.class,
       BytesWritable.class, BW_TO_BB, BB_TO_BW);
 
-  private static final Map<Class, PType> PRIMITIVES = ImmutableMap.<Class, PType>builder()
+  private static final Map<Class<?>, PType<?>> PRIMITIVES = ImmutableMap.<Class<?>,
PType<?>>builder()
       .put(String.class, strings)
       .put(Long.class, longs)
       .put(Integer.class, ints)
@@ -201,10 +217,10 @@ public class Writables {
       .put(ByteBuffer.class, bytes)
       .build();
   
-  private static final Map<Class, WritableType> EXTENSIONS = Maps.newHashMap();
+  private static final Map<Class<?>, WritableType<?, ?>> EXTENSIONS = Maps.newHashMap();
   
   public static <T> PType<T> getPrimitiveType(Class<T> clazz) {
-    return PRIMITIVES.get(clazz);
+    return (PType<T>) PRIMITIVES.get(clazz);
   }
   
   public static <T> void register(Class<T> clazz, WritableType<T, ?> ptype)
{
@@ -245,7 +261,7 @@ public class Writables {
   
   public static final <T> WritableType<T, T> records(Class<T> clazz) {
     if (EXTENSIONS.containsKey(clazz)) {
-      return EXTENSIONS.get(clazz);
+      return (WritableType<T, T>) EXTENSIONS.get(clazz);
     }
     return (WritableType<T, T>) writables(clazz.asSubclass(Writable.class));
   }
@@ -277,12 +293,12 @@ public class Writables {
    * 
    */
   private static class TWTupleMapFn extends MapFn<TupleWritable, Tuple> {
-    private final TupleFactory tupleFactory;
+    private final TupleFactory<?> tupleFactory;
     private final List<MapFn> fns;
 
     private transient Object[] values;
 
-    public TWTupleMapFn(TupleFactory tupleFactory, PType... ptypes) {
+    public TWTupleMapFn(TupleFactory<?> tupleFactory, PType<?>... ptypes) {
       this.tupleFactory = tupleFactory;
       this.fns = Lists.newArrayList();
       for (PType ptype : ptypes) {
@@ -334,15 +350,16 @@ public class Writables {
    * 
    */
   private static class TupleTWMapFn extends MapFn<Tuple, TupleWritable> {
-
+    private static final long serialVersionUID = 1L;
+    
     private transient TupleWritable writable;
     private transient Writable[] values;
 
     private final List<MapFn> fns;
 
-    public TupleTWMapFn(PType... ptypes) {
+    public TupleTWMapFn(PType<?>... ptypes) {
       this.fns = Lists.newArrayList();
-      for (PType ptype : ptypes) {
+      for (PType<?> ptype : ptypes) {
         fns.add(ptype.getOutputMapFn());
       }
     }
@@ -470,6 +487,8 @@ public class Writables {
 
   private static class CollectionArrayMapFn<T> extends
       MapFn<Collection<T>, GenericArrayWritable> {
+    private static final long serialVersionUID = 1L;
+    
     private final Class<? extends Writable> clazz;
     private final MapFn<T, Object> mapFn;
 
@@ -515,6 +534,7 @@ public class Writables {
   }
 
   private static class MapInputMapFn<T> extends MapFn<TextMapWritable<Writable>,
Map<String, T>> {
+    private static final long serialVersionUID = 1L;
     private final MapFn<Writable, T> mapFn;
 	
 	public MapInputMapFn(MapFn<Writable, T> mapFn) {
@@ -547,7 +567,8 @@ public class Writables {
   }
   
   private static class MapOutputMapFn<T> extends MapFn<Map<String, T>, TextMapWritable<Writable>>
{
-
+    private static final long serialVersionUID = 1L;
+    
 	private final Class<Writable> clazz;
 	private final MapFn<T, Writable> mapFn;
 	

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/util/PTypes.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/util/PTypes.java b/src/main/java/com/cloudera/crunch/util/PTypes.java
index 60bce4c..88664d0 100644
--- a/src/main/java/com/cloudera/crunch/util/PTypes.java
+++ b/src/main/java/com/cloudera/crunch/util/PTypes.java
@@ -65,6 +65,7 @@ public class PTypes {
   }
   
   public static MapFn<ByteBuffer, BigInteger> BYTE_TO_BIGINT = new MapFn<ByteBuffer,
BigInteger>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public BigInteger map(ByteBuffer input) {
       return input == null ? null : new BigInteger(input.array());
@@ -72,6 +73,7 @@ public class PTypes {
   };
 
   public static MapFn<BigInteger, ByteBuffer> BIGINT_TO_BYTE = new MapFn<BigInteger,
ByteBuffer>() {
+    private static final long serialVersionUID = 1L;
     @Override
     public ByteBuffer map(BigInteger input) {
       return input == null ? null : ByteBuffer.wrap(input.toByteArray());
@@ -79,6 +81,7 @@ public class PTypes {
   };
   
   public static class SmileInputMapFn<T> extends MapFn<ByteBuffer, T> {
+    private static final long serialVersionUID = 1L;
 
     private final Class<T> clazz;
     private transient ObjectMapper mapper;
@@ -103,6 +106,7 @@ public class PTypes {
   }
   
   public static class SmileOutputMapFn<T> extends MapFn<T, ByteBuffer> {
+    private static final long serialVersionUID = 1L;
     private transient ObjectMapper mapper;
     
     @Override
@@ -121,7 +125,8 @@ public class PTypes {
   }
 
   public static class JacksonInputMapFn<T> extends MapFn<String, T> {
-
+    private static final long serialVersionUID = 1L;
+    
     private final Class<T> clazz;
     private transient ObjectMapper mapper;
     
@@ -145,6 +150,8 @@ public class PTypes {
   }
   
   public static class JacksonOutputMapFn<T> extends MapFn<T, String> {
+    private static final long serialVersionUID = 1L;
+    
     private transient ObjectMapper mapper;
     
     @Override
@@ -163,7 +170,8 @@ public class PTypes {
   }
   
   public static class ProtoInputMapFn<T extends Message> extends MapFn<ByteBuffer,
T> {
-
+    private static final long serialVersionUID = 1L;
+    
     private final Class<T> clazz;
     private transient T instance;
     
@@ -188,6 +196,8 @@ public class PTypes {
   }
   
   public static class ProtoOutputMapFn<T extends Message> extends MapFn<T, ByteBuffer>
{
+    private static final long serialVersionUID = 1L;
+    
     public ProtoOutputMapFn() {
     }
     
@@ -198,6 +208,7 @@ public class PTypes {
   }
 
   public static class ThriftInputMapFn<T extends TBase> extends MapFn<ByteBuffer,
T> {
+    private static final long serialVersionUID = 1L;
 
     private final Class<T> clazz;
     private transient T instance;
@@ -233,7 +244,7 @@ public class PTypes {
   }
   
   public static class ThriftOutputMapFn<T extends TBase> extends MapFn<T, ByteBuffer>
{
-
+    private static final long serialVersionUID = 1L;
     private transient TSerializer serializer;
     
     public ThriftOutputMapFn() {

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/util/Protos.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/util/Protos.java b/src/main/java/com/cloudera/crunch/util/Protos.java
index 893c0fc..5c4cbb3 100644
--- a/src/main/java/com/cloudera/crunch/util/Protos.java
+++ b/src/main/java/com/cloudera/crunch/util/Protos.java
@@ -41,6 +41,8 @@ public class Protos {
   }
   
   public static class ExtractKeyFn<M extends Message, K> extends MapFn<M, K>
{
+    private static final long serialVersionUID = 1L;
+    
     private final String fieldName;
     
     private transient FieldDescriptor fd;
@@ -66,6 +68,8 @@ public class Protos {
   }
   
   public static class TextToProtoFn<M extends Message> extends DoFn<String, M>
{
+    private static final long serialVersionUID = 1L;
+    
     private final String sep;
     private final Class<M> msgClass;
     

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/2d25d5df/src/main/java/com/cloudera/crunch/util/Tuples.java
----------------------------------------------------------------------
diff --git a/src/main/java/com/cloudera/crunch/util/Tuples.java b/src/main/java/com/cloudera/crunch/util/Tuples.java
index 4e2cda9..20469cc 100644
--- a/src/main/java/com/cloudera/crunch/util/Tuples.java
+++ b/src/main/java/com/cloudera/crunch/util/Tuples.java
@@ -122,9 +122,9 @@ public class Tuples {
   }
   
   public static class TupleNIterable implements Iterable<TupleN> {
-    private final Iterator[] iters;
+    private final Iterator<?>[] iters;
     
-    public TupleNIterable(Iterable... iterables) {
+    public TupleNIterable(Iterable<?>... iterables) {
       this.iters = new Iterator[iterables.length];
       for (int i = 0; i < iters.length; i++) {
         iters[i] = iterables[i].iterator();


Mime
View raw message