mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r902616 - in /lucene/mahout/trunk/core/src: main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/ main/java/org/apache/mahout/classifier/bayes/mapreduce/cbayes/ main/java/org/apache/mahout/classifier/bayes/mapreduce/common/ main/jav...
Date Sun, 24 Jan 2010 18:13:43 GMT
Author: srowen
Date: Sun Jan 24 18:13:41 2010
New Revision: 902616

URL: http://svn.apache.org/viewvc?rev=902616&view=rev
Log:
More style

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/cbayes/CBayesDriver.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesFeatureOutputFormat.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesJob.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusteringJob.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/ClusterMapper.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/VectorModelDistribution.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansClusterMapper.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansReducer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/IteratorUtils.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/DenseVectorWritable.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/MultiLabelVectorWritable.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/RandomAccessSparseVectorWritable.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/SequentialAccessSparseVectorWritable.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/VisibleCanopy.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DatasetTest.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialOutputCollector.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialSequentialBuilder.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/MockContext.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step0JobTest.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step1MapperTest.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java
Sun Jan 24 18:13:41 2010
@@ -47,9 +47,7 @@
    * @throws InterruptedException
    */
   @Override
-  public void runJob(String input, String output, BayesParameters params) throws IOException,
-                                                                         InterruptedException,
-                                                                         ClassNotFoundException
{
+  public void runJob(String input, String output, BayesParameters params) throws IOException
{
     Configuration conf = new JobConf(BayesDriver.class);
     Path outPath = new Path(output);
     FileSystem dfs = FileSystem.get(outPath.toUri(), conf);

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/cbayes/CBayesDriver.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/cbayes/CBayesDriver.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/cbayes/CBayesDriver.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/cbayes/CBayesDriver.java
Sun Jan 24 18:13:41 2010
@@ -47,9 +47,7 @@
    * @throws InterruptedException
    */
   @Override
-  public void runJob(String input, String output, BayesParameters params) throws IOException,
-                                                                         InterruptedException,
-                                                                         ClassNotFoundException
{
+  public void runJob(String input, String output, BayesParameters params) throws IOException
{
     Configuration conf = new JobConf(CBayesDriver.class);
     Path outPath = new Path(output);
     FileSystem dfs = FileSystem.get(outPath.toUri(), conf);
@@ -73,8 +71,7 @@
     BayesWeightSummerDriver summer = new BayesWeightSummerDriver();
     summer.runJob(input, output, params);
     
-    log
-        .info("Calculating the weight Normalisation factor for each complement class...");
+    log.info("Calculating the weight Normalisation factor for each complement class...");
     // Calculate the normalization factor Sigma_W_ij for each complement class.
     CBayesThetaNormalizerDriver normalizer = new CBayesThetaNormalizerDriver();
     normalizer.runJob(input, output, params);

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesFeatureOutputFormat.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesFeatureOutputFormat.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesFeatureOutputFormat.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesFeatureOutputFormat.java
Sun Jan 24 18:13:41 2010
@@ -67,7 +67,7 @@
         return "trainer-docCount/" + name;
       }
     }
-    throw new RuntimeException("Unrecognized Tuple: " + key);
+    throw new IllegalArgumentException("Unrecognized Tuple: " + key);
   }
   
 }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesJob.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesJob.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesJob.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesJob.java
Sun Jan 24 18:13:41 2010
@@ -34,8 +34,6 @@
    * @param output
    *          path to output directory.
    * */
-  void runJob(String input, String output, BayesParameters params) throws IOException,
-                                                                  ClassNotFoundException,
-                                                                  InterruptedException;
+  void runJob(String input, String output, BayesParameters params) throws IOException;
   
 }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusteringJob.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusteringJob.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusteringJob.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyClusteringJob.java
Sun Jan 24 18:13:41 2010
@@ -35,9 +35,8 @@
 import java.io.IOException;
 
 /**
- * Runs the {@link org.apache.mahout.clustering.canopy.CanopyDriver#runJob(String, String,
String, double, double,
- * Class)} and then {@link org.apache.mahout.clustering.canopy.ClusterDriver#runJob(String,
String, String, String,
- * double, double, Class)}.
+ * Runs the {@link org.apache.mahout.clustering.canopy.CanopyDriver#runJob(String, String,
String, double, double)}
+ * and then {@link org.apache.mahout.clustering.canopy.ClusterDriver#runJob(String, String,
String, String, double, double)}.
  */
 public final class CanopyClusteringJob {
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/ClusterMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/ClusterMapper.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/ClusterMapper.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/ClusterMapper.java
Sun Jan 24 18:13:41 2010
@@ -82,7 +82,7 @@
       }
       
       if (canopies.isEmpty()) {
-        throw new NullPointerException("Canopies are empty!");
+        throw new IllegalStateException("Canopies are empty!");
       }
     }
   }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java
Sun Jan 24 18:13:41 2010
@@ -122,9 +122,9 @@
   public String toString() {
     StringBuilder buf = new StringBuilder();
     buf.append("nm{n=").append(s0).append(" m=[");
-    int nextIx = 0;
     if (mean != null) {
       // handle sparse Vectors gracefully, suppressing zero values
+      int nextIx = 0;
       for (int i = 0; i < mean.size(); i++) {
         double elem = mean.get(i);
         if (elem == 0.0)

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/VectorModelDistribution.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/VectorModelDistribution.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/VectorModelDistribution.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/VectorModelDistribution.java
Sun Jan 24 18:13:41 2010
@@ -21,11 +21,11 @@
 public abstract class VectorModelDistribution implements
     ModelDistribution<VectorWritable> {
 
-  public VectorModelDistribution() {
+  protected VectorModelDistribution() {
     super();
   }
 
-  public VectorModelDistribution(VectorWritable modelPrototype) {
+  protected VectorModelDistribution(VectorWritable modelPrototype) {
     super();
     this.modelPrototype = modelPrototype;
   }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansClusterMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansClusterMapper.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansClusterMapper.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansClusterMapper.java
Sun Jan 24 18:13:41 2010
@@ -64,7 +64,7 @@
     }
     
     if (clusters.isEmpty()) {
-      throw new NullPointerException("Cluster is empty!!!");
+      throw new IllegalStateException("Cluster is empty!!!");
     }
   }
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java
Sun Jan 24 18:13:41 2010
@@ -70,7 +70,7 @@
     }
     
     if (clusters.isEmpty()) {
-      throw new NullPointerException("Cluster is empty!!!");
+      throw new IllegalStateException("Cluster is empty!!!");
     }
   }
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansReducer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansReducer.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansReducer.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansReducer.java
Sun Jan 24 18:13:41 2010
@@ -73,7 +73,7 @@
     }
     
     if (clusterMap.isEmpty()) {
-      throw new NullPointerException("Cluster is empty!!!");
+      throw new IllegalStateException("Cluster is empty!!!");
     }
   }
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java
Sun Jan 24 18:13:41 2010
@@ -69,12 +69,12 @@
       this.clusterMap = new HashMap<String, Cluster>();
 
       String path = job.get(KMeansConfigKeys.CLUSTER_PATH_KEY);
-      if (job != null && path.length() > 0) {
+      if (path.length() > 0) {
         List<Cluster> clusters = new ArrayList<Cluster>();
         KMeansUtil.configureWithClusterInfo(path, clusters);
         setClusterMap(clusters);
         if (clusterMap.isEmpty()) {
-          throw new NullPointerException("Cluster is empty!");
+          throw new IllegalStateException("Cluster is empty!");
         }
       }
     } catch (ClassNotFoundException e) {

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/IteratorUtils.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/IteratorUtils.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/IteratorUtils.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/IteratorUtils.java
Sun Jan 24 18:13:41 2010
@@ -64,7 +64,6 @@
    * @return a {@link List} with the objects one gets by iterating over the given {@link
Iterable}, sorted according to
    *         the given {@link Comparator}
    */
-  @SuppressWarnings("unchecked")
   public static <K> List<K> iterableToList(Iterable<K> iterable, Comparator<K>
comparator) {
     if (iterable == null) {
       throw new IllegalArgumentException("iterable is null");

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java Sun
Jan 24 18:13:41 2010
@@ -282,7 +282,7 @@
 
   public DecisionForest build(int nbTrees, PredictionCallback callback)
       throws IOException, ClassNotFoundException, InterruptedException {
-    int numTrees = getNbTrees(conf);
+    //int numTrees = getNbTrees(conf);
 
     Path outputPath = getOutputPath(conf);
     FileSystem fs = outputPath.getFileSystem(conf);

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java
Sun Jan 24 18:13:41 2010
@@ -332,7 +332,7 @@
     return frequentPatterns;
   }
 
-  private FrequentPatternMaxHeap growthBottomUp(FPTree tree, MutableLong minSupportMutable,
int k,
+  private static FrequentPatternMaxHeap growthBottomUp(FPTree tree, MutableLong minSupportMutable,
int k,
       FPTreeDepthCache treeCache, int level, boolean conditionalOfCurrentAttribute, int currentAttribute,
       StatusUpdater updater) {
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/DenseVectorWritable.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/DenseVectorWritable.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/DenseVectorWritable.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/DenseVectorWritable.java
Sun Jan 24 18:13:41 2010
@@ -51,7 +51,7 @@
 
   @Override
   public void readFields(DataInput dataInput) throws IOException {
-    final String className = dataInput.readUTF();
+    String className = dataInput.readUTF();
     if(className.equals(getClass().getName())) {
       this.setName(dataInput.readUTF());
     } else {

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/MultiLabelVectorWritable.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/MultiLabelVectorWritable.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/MultiLabelVectorWritable.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/MultiLabelVectorWritable.java
Sun Jan 24 18:13:41 2010
@@ -57,8 +57,8 @@
   @Override
   public void write(DataOutput out) throws IOException {
     out.writeInt(labels.length);
-    for (int i = 0; i < labels.length; i++) {
-      out.writeInt(labels[i]);
+    for (int label : labels) {
+      out.writeInt(label);
     }
     super.write(out);
   }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/RandomAccessSparseVectorWritable.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/RandomAccessSparseVectorWritable.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/RandomAccessSparseVectorWritable.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/RandomAccessSparseVectorWritable.java
Sun Jan 24 18:13:41 2010
@@ -56,7 +56,7 @@
 
   @Override
   public void readFields(DataInput dataInput) throws IOException {
-    final String className = dataInput.readUTF();
+    String className = dataInput.readUTF();
     if(className.equals(getClass().getName())) {
       this.setName(dataInput.readUTF());
     } else {

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/SequentialAccessSparseVectorWritable.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/SequentialAccessSparseVectorWritable.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/SequentialAccessSparseVectorWritable.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/math/SequentialAccessSparseVectorWritable.java
Sun Jan 24 18:13:41 2010
@@ -54,7 +54,7 @@
 
   @Override
   public void readFields(DataInput dataInput) throws IOException {
-    final String className = dataInput.readUTF();
+    String className = dataInput.readUTF();
     if(className.equals(getClass().getName())) {
       setName(dataInput.readUTF());
     } else {

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/VisibleCanopy.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/VisibleCanopy.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/VisibleCanopy.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/canopy/VisibleCanopy.java
Sun Jan 24 18:13:41 2010
@@ -30,7 +30,7 @@
 
   private final List<Vector> points = new ArrayList<Vector>();
 
-  public VisibleCanopy(Vector point, int id) {
+  VisibleCanopy(Vector point, int id) {
     super(point, id);
     points.add(point);
   }

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DatasetTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DatasetTest.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DatasetTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DatasetTest.java Sun
Jan 24 18:13:41 2010
@@ -33,9 +33,6 @@
 
   private static final int nbAttributes = 10;
 
-  private ByteArrayOutputStream byteOutStream;
-  private DataOutput out;
-
   private static Dataset readDataset(byte[] bytes) throws IOException {
     ByteArrayInputStream byteInStream = new ByteArrayInputStream(bytes);
     DataInput in = new DataInputStream(byteInStream);
@@ -45,8 +42,8 @@
   public void testWritable() throws Exception {
 
     Random rng = RandomUtils.getRandom();
-    byteOutStream = new ByteArrayOutputStream();
-    out = new DataOutputStream(byteOutStream);
+    ByteArrayOutputStream byteOutStream = new ByteArrayOutputStream();
+    DataOutput out = new DataOutputStream(byteOutStream);
 
     int n = 10;
     for (int nloop=0; nloop< n; nloop++) {

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialOutputCollector.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialOutputCollector.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialOutputCollector.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialOutputCollector.java
Sun Jan 24 18:13:41 2010
@@ -31,7 +31,7 @@
 
   private int index = 0;
 
-  public PartialOutputCollector(int nbTrees) {
+  PartialOutputCollector(int nbTrees) {
     keys = new TreeID[nbTrees];
     values = new MapredOutput[nbTrees];
   }

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialSequentialBuilder.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialSequentialBuilder.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialSequentialBuilder.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialSequentialBuilder.java
Sun Jan 24 18:13:41 2010
@@ -66,13 +66,13 @@
   /** partitions' sizes in hadoop order */
   private int[] sizes;
 
-  public PartialSequentialBuilder(TreeBuilder treeBuilder, Path dataPath,
+  PartialSequentialBuilder(TreeBuilder treeBuilder, Path dataPath,
       Dataset dataset, long seed, Configuration conf) {
     super(treeBuilder, dataPath, new Path("notUsed"), seed, conf);
     this.dataset = dataset;
   }
 
-  public PartialSequentialBuilder(TreeBuilder treeBuilder, Path dataPath,
+  PartialSequentialBuilder(TreeBuilder treeBuilder, Path dataPath,
       Dataset dataset, long seed) {
     this(treeBuilder, dataPath, dataset, seed, new Configuration());
   }

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/MockContext.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/MockContext.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/MockContext.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/MockContext.java
Sun Jan 24 18:13:41 2010
@@ -35,7 +35,7 @@
 
   private int index = 0;
 
-  public MockContext(Mapper<?,?,?,?> mapper, Configuration conf, TaskAttemptID taskid,
+  MockContext(Mapper<?,?,?,?> mapper, Configuration conf, TaskAttemptID taskid,
       int nbTrees) throws IOException, InterruptedException {
     mapper.super(conf, taskid, null, null, null, null, null);
 

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step0JobTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step0JobTest.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step0JobTest.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step0JobTest.java
Sun Jan 24 18:13:41 2010
@@ -61,8 +61,6 @@
 
   private static final int numMaps = 5;
 
-  private Step0Context context;
-
   /**
    * Computes the "mapred.max.split.size" that will generate the desired number
    * of input splits
@@ -106,14 +104,14 @@
     splits.toArray(sorted);
     Builder.sortSplits(sorted);
 
-    context = new Step0Context(new Step0Mapper(), job.getConfiguration(),
-        new TaskAttemptID(), numMaps);
+    Step0Context context = new Step0Context(new Step0Mapper(), job.getConfiguration(),
+                                            new TaskAttemptID(), numMaps);
 
     for (int p = 0; p < numMaps; p++) {
       InputSplit split = sorted[p];
 
       RecordReader<LongWritable, Text> reader = input.createRecordReader(split,
-          context);
+                                                                         context);
       reader.initialize(split, context);
 
       Step0Mapper mapper = new Step0Mapper();

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step1MapperTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step1MapperTest.java?rev=902616&r1=902615&r2=902616&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step1MapperTest.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step1MapperTest.java
Sun Jan 24 18:13:41 2010
@@ -42,7 +42,7 @@
    */
   private static class MockTreeBuilder implements TreeBuilder {
 
-    protected Data expected;
+    private Data expected;
 
     public void setExpected(Data data) {
       expected = data;



Mime
View raw message