mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r930803 - in /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables: ItemPrefWithLengthArrayWritable.java UserPrefArrayWritable.java UserWritable.java
Date Mon, 05 Apr 2010 06:07:18 GMT
Author: srowen
Date: Mon Apr  5 06:07:18 2010
New Revision: 930803

URL: http://svn.apache.org/viewvc?rev=930803&view=rev
Log:
Oops, fixed compile error from last commit which missed out some changes

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/ItemPrefWithLengthArrayWritable.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserPrefArrayWritable.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserWritable.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/ItemPrefWithLengthArrayWritable.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/ItemPrefWithLengthArrayWritable.java?rev=930803&r1=930802&r2=930803&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/ItemPrefWithLengthArrayWritable.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/ItemPrefWithLengthArrayWritable.java
Mon Apr  5 06:07:18 2010
@@ -18,7 +18,6 @@
 package org.apache.mahout.cf.taste.hadoop.similarity.item.writables;
 
 import org.apache.hadoop.io.ArrayWritable;
-import org.apache.hadoop.io.Writable;
 
 /**
  * An {@link ArrayWritable} holding {@link ItemPrefWithLengthWritable}s
@@ -36,11 +35,6 @@ public final class ItemPrefWithLengthArr
   }
 
   public ItemPrefWithLengthWritable[] getItemPrefs() {
-    Writable[] writables = get();
-    ItemPrefWithLengthWritable[] itemPrefs = new ItemPrefWithLengthWritable[writables.length];
-    for (int n=0; n<writables.length; n++) {
-      itemPrefs[n] = (ItemPrefWithLengthWritable)writables[n];
-    }
-    return itemPrefs;
+    return (ItemPrefWithLengthWritable[]) toArray();
   }
 }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserPrefArrayWritable.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserPrefArrayWritable.java?rev=930803&r1=930802&r2=930803&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserPrefArrayWritable.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserPrefArrayWritable.java
Mon Apr  5 06:07:18 2010
@@ -18,7 +18,6 @@
 package org.apache.mahout.cf.taste.hadoop.similarity.item.writables;
 
 import org.apache.hadoop.io.ArrayWritable;
-import org.apache.hadoop.io.Writable;
 
 /**
  * An {@link ArrayWritable} holding {@link UserPrefWritable}s
@@ -36,11 +35,6 @@ public final class UserPrefArrayWritable
   }
 
   public UserPrefWritable[] getUserPrefs() {
-    Writable[] writables = get();
-    UserPrefWritable[] userPrefs = new UserPrefWritable[writables.length];
-    for (int n=0; n<writables.length; n++) {
-      userPrefs[n] = (UserPrefWritable) writables[n];
-    }
-    return userPrefs;
+    return (UserPrefWritable[]) toArray();
   }
 }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserWritable.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserWritable.java?rev=930803&r1=930802&r2=930803&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserWritable.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/writables/UserWritable.java
Mon Apr  5 06:07:18 2010
@@ -25,7 +25,7 @@ import org.apache.hadoop.io.WritableComp
 import org.apache.mahout.common.RandomUtils;
 
 /** A {@link WritableComparable} encapsulating a user ID. */
-public final class UserWritable implements WritableComparable<UserWritable> {
+public class UserWritable implements WritableComparable<UserWritable> {
 
   private long userID;
 



Mime
View raw message