Permalink
Browse files

Minor cleanup and logging improvement

  • Loading branch information...
eljefe6a committed Dec 29, 2012
1 parent 8d9e489 commit 9ddaa05fb022b2aaf6bd0af833f113860d87e671
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/BoggleDriver.java
View
@@ -79,7 +79,7 @@ public int run(String[] args) throws Exception {
configuration.set(BLOOM_PARAM, bloomPath);
configuration.set(DICTIONARY_PARAM, dictionary);
- BoggleRoll roll = BoggleRoll.createRoll(configuration.getInt(ROLL_VERSION, BoggleRoll.newVersion));
+ BoggleRoll roll = BoggleRoll.createRoll(configuration.getInt(ROLL_VERSION, BoggleRoll.bigBoggleVersion));
configuration.set(ROLL_PARAM, roll.serialize());
int iteration = traverseGraph(input, configuration, fileSystem, roll);
@@ -130,9 +130,6 @@ private int traverseGraph(String input, Configuration configuration, FileSystem
job.setMapperClass(BoggleMapper.class);
- job.setMapOutputKeyClass(Text.class);
- job.setMapOutputValueClass(RollGraphWritable.class);
-
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(RollGraphWritable.class);
@@ -149,9 +146,9 @@ private int traverseGraph(String input, Configuration configuration, FileSystem
logger.info("Traversed graph for " + iteration + " iterations. Found " + currentWordCount
+ " potential words. Bloom saved " + bloomSavings + " so far.");
- if (currentWordCount == previousWordCount) {
+ if (currentWordCount == previousWordCount || iteration == (roll.rollSize * roll.rollSize)) {
logger.info("Finished traversing graph after " + iteration + " iterations. Found " + currentWordCount
- + " potential words. Bloom saved " + bloomSavings + " so far.");
+ + " potential words. Bloom saved " + bloomSavings + ".");
break;
}

0 comments on commit 9ddaa05

Please sign in to comment.