Author: tdunning
Date: Fri Jan 11 00:59:50 2013
New Revision: 1431771
URL: http://svn.apache.org/viewvc?rev=1431771&view=rev
Log:
MAHOUT-1138 - Fix bogus Serializable classes.
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/common/IntPairWritable.java
mahout/trunk/core/src/main/java/org/apache/mahout/math/VarLongWritable.java
mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SplitPartitionedWritable.java
mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyGroupComparator.java
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/common/IntPairWritable.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/common/IntPairWritable.java?rev=1431771&r1=1431770&r2=1431771&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/common/IntPairWritable.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/common/IntPairWritable.java
Fri Jan 11 00:59:50 2013
@@ -31,7 +31,7 @@ import java.util.Arrays;
* A {@link WritableComparable} which encapsulates an ordered pair of signed
integers.
*/
public final class IntPairWritable extends BinaryComparable
- implements WritableComparable<BinaryComparable>, Serializable, Cloneable {
+ implements WritableComparable<BinaryComparable>, Cloneable {
static final int INT_BYTE_LENGTH = 4;
static final int INT_PAIR_BYTE_LENGTH = 2 * INT_BYTE_LENGTH;
@@ -145,7 +145,7 @@ public final class IntPairWritable exten
WritableComparator.define(IntPairWritable.class, new Comparator());
}
- public static final class Comparator extends WritableComparator implements
Serializable {
+ public static final class Comparator extends WritableComparator {
public Comparator() {
super(IntPairWritable.class);
}
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/math/VarLongWritable.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/VarLongWritable.java?rev=1431771&r1=1431770&r2=1431771&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/math/VarLongWritable.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/math/VarLongWritable.java
Fri Jan 11 00:59:50 2013
@@ -24,7 +24,7 @@ import java.io.IOException;
import com.google.common.primitives.Longs;
import org.apache.hadoop.io.WritableComparable;
-public class VarLongWritable implements WritableComparable<VarLongWritable>,
Cloneable {
+public class VarLongWritable implements WritableComparable<VarLongWritable> {
private long value;
@@ -59,11 +59,6 @@ public class VarLongWritable implements
}
@Override
- public VarLongWritable clone() {
- return new VarLongWritable(value);
- }
-
- @Override
public int compareTo(VarLongWritable other) {
if (value >= other.value) {
if (value > other.value) {
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SplitPartitionedWritable.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SplitPartitionedWritable.java?rev=1431771&r1=1431770&r2=1431771&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SplitPartitionedWritable.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SplitPartitionedWritable.java
Fri Jan 11 00:59:50 2013
@@ -19,7 +19,6 @@ package org.apache.mahout.math.hadoop.st
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
-import java.io.Serializable;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;
@@ -126,7 +125,7 @@ public class SplitPartitionedWritable im
return 0;
}
- public static final class SplitGroupingComparator extends WritableComparator
implements Serializable {
+ public static final class SplitGroupingComparator extends WritableComparator
{
public SplitGroupingComparator() {
super(SplitPartitionedWritable.class, true);
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyGroupComparator.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyGroupComparator.java?rev=1431771&r1=1431770&r2=1431771&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyGroupComparator.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/collocations/llr/GramKeyGroupComparator.java
Fri Jan 11 00:59:50 2013
@@ -20,12 +20,10 @@ package org.apache.mahout.vectorizer.col
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;
-import java.io.Serializable;
-
/** Group GramKeys based on their Gram, ignoring the secondary sort key, so
that all keys with the same Gram are sent
* to the same call of the reduce method, sorted in natural order (for
GramKeys).
*/
-class GramKeyGroupComparator extends WritableComparator implements
Serializable {
+class GramKeyGroupComparator extends WritableComparator {
GramKeyGroupComparator() {
super(GramKey.class, true);