Author: jeastman
Date: Tue Aug 17 21:25:25 2010
New Revision: 986490
URL: http://svn.apache.org/viewvc?rev=986490&view=rev
Log:
MAHOUT-467: removed static modifiers on driver private methods that were not
invoked statically anyway
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansDriver.java
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/lda/LDADriver.java
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java?rev=986490&r1=986489&r2=986490&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java
Tue Aug 17 21:25:25 2010
@@ -189,7 +189,7 @@ public class CanopyDriver extends Abstra
* @param t2 the double T2 distance metric
* @return the canopy output directory Path
*/
- private static Path buildClustersSeq(Path input, Path output, String
measureClassName, double t1, double t2)
+ private Path buildClustersSeq(Path input, Path output, String
measureClassName, double t1, double t2)
throws InstantiationException, IllegalAccessException,
ClassNotFoundException, IOException {
ClassLoader ccl = Thread.currentThread().getContextClassLoader();
DistanceMeasure measure = (DistanceMeasure)
ccl.loadClass(measureClassName).newInstance();
@@ -238,7 +238,7 @@ public class CanopyDriver extends Abstra
* @param t2 the double T2 distance metric
* @return the canopy output directory Path
*/
- private static Path buildClustersMR(Path input, Path output, String
measureClassName, double t1, double t2)
+ private Path buildClustersMR(Path input, Path output, String
measureClassName, double t1, double t2)
throws IOException, InterruptedException, ClassNotFoundException {
Configuration conf = new Configuration();
conf.set(CanopyConfigKeys.DISTANCE_MEASURE_KEY, measureClassName);
@@ -294,7 +294,7 @@ public class CanopyDriver extends Abstra
}
}
- private static void clusterDataSeq(Path points,
+ private void clusterDataSeq(Path points,
Path canopies,
Path output,
String measureClassName,
@@ -349,7 +349,7 @@ public class CanopyDriver extends Abstra
}
}
- private static void clusterDataMR(Path points,
+ private void clusterDataMR(Path points,
Path canopies,
Path output,
String measureClassName,
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java?rev=986490&r1=986489&r2=986490&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java
Tue Aug 17 21:25:25 2010
@@ -234,7 +234,7 @@ public class DirichletDriver extends Abs
/**
* Read the first input vector to determine the prototype size for the
modelPrototype
*/
- private static int readPrototypeSize(Path input) throws IOException,
InstantiationException, IllegalAccessException {
+ private int readPrototypeSize(Path input) throws IOException,
InstantiationException, IllegalAccessException {
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(input.toUri(), conf);
FileStatus[] status = fs.listStatus(input, new OutputLogFilter());
@@ -276,7 +276,7 @@ public class DirichletDriver extends Abs
writeState(output, stateOut, numModels, state);
}
- private static void writeState(Path output, Path stateOut, int numModels,
DirichletState<VectorWritable> state)
+ private void writeState(Path output, Path stateOut, int numModels,
DirichletState<VectorWritable> state)
throws IOException {
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(output.toUri(), conf);
@@ -310,7 +310,7 @@ public class DirichletDriver extends Abs
* @param numReducers
* the number of Reducers desired
*/
- private static void runIteration(Path input,
+ private void runIteration(Path input,
Path stateIn,
Path stateOut,
String modelFactory,
@@ -471,7 +471,7 @@ public class DirichletDriver extends Abs
return clustersIn;
}
- private static Path buildClustersSeq(Path input,
+ private Path buildClustersSeq(Path input,
Path output,
String modelFactory,
String modelPrototype,
@@ -521,7 +521,7 @@ public class DirichletDriver extends Abs
return clustersIn;
}
- private static Path buildClustersMR(Path input,
+ private Path buildClustersMR(Path input,
Path output,
String modelFactory,
String modelPrototype,
@@ -565,7 +565,7 @@ public class DirichletDriver extends Abs
* a double threshold value emits all clusters having greater pdf
(emitMostLikely = false)
* @param runSequential execute sequentially if true
*/
- public static void clusterData(Path input,
+ public void clusterData(Path input,
Path stateIn,
Path output,
boolean emitMostLikely,
@@ -579,7 +579,7 @@ public class DirichletDriver extends Abs
}
}
- private static void clusterDataSeq(Path input,
+ private void clusterDataSeq(Path input,
Path stateIn,
Path output,
boolean emitMostLikely,
@@ -614,7 +614,7 @@ public class DirichletDriver extends Abs
}
- private static void clusterDataMR(Path input, Path stateIn, Path output,
boolean emitMostLikely, double threshold)
+ private void clusterDataMR(Path input, Path stateIn, Path output, boolean
emitMostLikely, double threshold)
throws IOException, InterruptedException, ClassNotFoundException {
Configuration conf = new Configuration();
conf.set(STATE_IN_KEY, stateIn.toString());
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java?rev=986490&r1=986489&r2=986490&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java
Tue Aug 17 21:25:25 2010
@@ -376,7 +376,7 @@ public class FuzzyKMeansDriver extends A
}
}
- private static Path buildClustersSeq(Path input,
+ private Path buildClustersSeq(Path input,
Path clustersIn,
Path output,
DistanceMeasure measure,
@@ -506,7 +506,7 @@ public class FuzzyKMeansDriver extends A
}
}
- private static void clusterDataSeq(Path input,
+ private void clusterDataSeq(Path input,
Path clustersIn,
Path output,
DistanceMeasure measure,
@@ -546,7 +546,7 @@ public class FuzzyKMeansDriver extends A
}
}
- private static void clusterDataMR(Path input,
+ private void clusterDataMR(Path input,
Path clustersIn,
Path output,
DistanceMeasure measure,
@@ -595,7 +595,7 @@ public class FuzzyKMeansDriver extends A
* @throws IOException
* if there was an IO error
*/
- private static boolean isConverged(Path filePath, Configuration conf,
FileSystem fs) throws IOException {
+ private boolean isConverged(Path filePath, Configuration conf, FileSystem
fs) throws IOException {
Path clusterPath = new Path(filePath, "*");
List<Path> result = new ArrayList<Path>();
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansDriver.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansDriver.java?rev=986490&r1=986489&r2=986490&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansDriver.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansDriver.java
Tue Aug 17 21:25:25 2010
@@ -250,7 +250,7 @@ public class KMeansDriver extends Abstra
}
}
- private static Path buildClustersSeq(Path input,
+ private Path buildClustersSeq(Path input,
Path clustersIn,
Path output,
DistanceMeasure measure,
@@ -349,7 +349,7 @@ public class KMeansDriver extends Abstra
* the number of reducer tasks
* @return true if the iteration successfully runs
*/
- private static boolean runIteration(Path input,
+ private boolean runIteration(Path input,
Path clustersIn,
Path clustersOut,
String measureClass,
@@ -399,7 +399,7 @@ public class KMeansDriver extends Abstra
* @throws IOException
* if there was an IO error
*/
- private static boolean isConverged(Path filePath, Configuration conf,
FileSystem fs) throws IOException {
+ private boolean isConverged(Path filePath, Configuration conf, FileSystem
fs) throws IOException {
FileStatus[] parts = fs.listStatus(filePath);
for (FileStatus part : parts) {
String name = part.getPath().getName();
@@ -461,7 +461,7 @@ public class KMeansDriver extends Abstra
}
}
- private static void clusterDataSeq(Path input,
+ private void clusterDataSeq(Path input,
Path clustersIn,
Path output,
DistanceMeasure measure,
@@ -499,7 +499,7 @@ public class KMeansDriver extends Abstra
}
- private static void clusterDataMR(Path input,
+ private void clusterDataMR(Path input,
Path clustersIn,
Path output,
DistanceMeasure measure,
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/lda/LDADriver.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/lda/LDADriver.java?rev=986490&r1=986489&r2=986490&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/lda/LDADriver.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/lda/LDADriver.java
Tue Aug 17 21:25:25 2010
@@ -226,7 +226,7 @@ public final class LDADriver extends Abs
}
}
- private static void writeInitialState(Path statePath, int numTopics, int
numWords) throws IOException {
+ private void writeInitialState(Path statePath, int numTopics, int numWords)
throws IOException {
Configuration job = new Configuration();
FileSystem fs = statePath.getFileSystem(job);
@@ -255,7 +255,7 @@ public final class LDADriver extends Abs
}
}
- private static double findLL(Path statePath, Configuration job) throws
IOException {
+ private double findLL(Path statePath, Configuration job) throws IOException {
FileSystem fs = statePath.getFileSystem(job);
double ll = 0.0;
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java?rev=986490&r1=986489&r2=986490&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java
Tue Aug 17 21:25:25 2010
@@ -174,7 +174,7 @@ public class MeanShiftCanopyDriver exten
* @param convergenceDelta
* the double convergence criteria
*/
- private static void runIteration(Path input,
+ private void runIteration(Path input,
Path output,
Path control,
String measureClassName,
@@ -263,7 +263,7 @@ public class MeanShiftCanopyDriver exten
}
}
- public static void createCanopyFromVectors(Path input, Path output, boolean
runSequential)
+ public void createCanopyFromVectors(Path input, Path output, boolean
runSequential)
throws IOException, InterruptedException, ClassNotFoundException,
InstantiationException, IllegalAccessException {
if (runSequential) {
createCanopyFromVectorsSeq(input, output);
@@ -276,7 +276,7 @@ public class MeanShiftCanopyDriver exten
* @param input the Path to the input VectorWritable data
* @param output the Path to the initial clusters directory
*/
- private static void createCanopyFromVectorsSeq(Path input, Path output)
+ private void createCanopyFromVectorsSeq(Path input, Path output)
throws IOException, InstantiationException, IllegalAccessException {
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(input.toUri(), conf);
@@ -304,7 +304,7 @@ public class MeanShiftCanopyDriver exten
}
}
- private static void createCanopyFromVectorsMR(Path input, Path output)
+ private void createCanopyFromVectorsMR(Path input, Path output)
throws IOException, InterruptedException, ClassNotFoundException {
Configuration conf = new Configuration();
Job job = new Job(conf);
@@ -341,7 +341,7 @@ public class MeanShiftCanopyDriver exten
* an int number of iterations
* @param runSequential if true run in sequential execution mode
*/
- public static Path buildClusters(Path clustersIn,
+ public Path buildClusters(Path clustersIn,
Path output,
DistanceMeasure measure,
double t1,
@@ -357,7 +357,7 @@ public class MeanShiftCanopyDriver exten
}
}
- private static Path buildClustersSeq(Path clustersIn,
+ private Path buildClustersSeq(Path clustersIn,
Path output,
DistanceMeasure measure,
double t1,
@@ -413,7 +413,7 @@ public class MeanShiftCanopyDriver exten
return clustersIn;
}
- private static Path buildClustersMR(Path clustersIn,
+ private Path buildClustersMR(Path clustersIn,
Path output,
DistanceMeasure measure,
double t1,
@@ -450,7 +450,7 @@ public class MeanShiftCanopyDriver exten
* @param runSequential if true run in sequential execution mode
* @param measure the DistanceMeasure to use
*/
- public static void clusterData(Path input,
+ public void clusterData(Path input,
Path clustersIn,
Path output,
boolean runSequential,
@@ -463,10 +463,8 @@ public class MeanShiftCanopyDriver exten
}
}
- private static void clusterDataSeq(Path input, Path clustersIn, Path output,
DistanceMeasure measure)
+ private void clusterDataSeq(Path input, Path clustersIn, Path output,
DistanceMeasure measure)
throws IOException, InstantiationException, IllegalAccessException {
- MeanShiftCanopyClusterer clusterer = new MeanShiftCanopyClusterer(measure,
0, 0, 0);
-
Collection<MeanShiftCanopy> clusters = new ArrayList<MeanShiftCanopy>();
Configuration conf = new Configuration();
FileSystem fs = FileSystem.get(clustersIn.toUri(), conf);
@@ -512,7 +510,7 @@ public class MeanShiftCanopyDriver exten
}
}
- private static void clusterDataMR(Path input, Path clustersIn, Path output)
+ private void clusterDataMR(Path input, Path clustersIn, Path output)
throws IOException, InterruptedException, ClassNotFoundException {
Configuration conf = new Configuration();
conf.set(STATE_IN_KEY, clustersIn.toString());