Skip to content

Commit

Permalink
#92 -- more logging code
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhoule committed Dec 18, 2013
1 parent e4b8bc0 commit bfdfe11
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 34 deletions.
69 changes: 36 additions & 33 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import com.google.common.collect.Lists;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.log4j.Logger;

import java.io.IOException;
import java.util.List;

abstract public class EntityMatchesRuleReducer<KEY,VALUE> extends Reducer<KEY,VALUE,NullWritable,VALUE> {
static Logger log= Logger.getLogger(EntityMatchesRuleReducer.class);

@Override
protected void reduce(KEY key,Iterable<VALUE> values,Context context) throws IOException, InterruptedException {

Expand All @@ -19,8 +22,12 @@ protected void reduce(KEY key,Iterable<VALUE> values,Context context) throws IOE
//

List<VALUE> rewindableValues= Lists.newArrayList();
for(VALUE value:values)
for(VALUE value:values) {
if (value.toString().contains("/m.01hpdw>")) {
log.info("Key: "+key+" has value ["+value+"]");
}
rewindableValues.add(value);
}

if(matches(key,rewindableValues))
for(VALUE value:rewindableValues)
Expand Down

0 comments on commit bfdfe11

Please sign in to comment.