Skip to content

Commit

Permalink
fixed a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jatrost committed Mar 30, 2012
1 parent 73b29a7 commit 5aebfdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class BinaryAnalysisJob extends Configured implements Tool {

private static void usage(String msg)
{
System.err.println("Error: "+msg);
System.err.println("Usage: hadoop jar JARFILE.jar "+BinaryAnalysisJob.class.getName()+" <inDir> <outDir>");
System.err.println(" inDir - HDFS input dir");
System.err.println(" outDir - HDFS output dir\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;

public class BinaryAnalysisMapper<K, V> extends Mapper<Text, BytesWritable, K, V>
Expand Down Expand Up @@ -66,7 +67,6 @@ public class BinaryAnalysisMapper<K, V> extends Mapper<Text, BytesWritable, K, V

protected void setup(Context context) throws java.io.IOException ,InterruptedException
{

Configuration conf = context.getConfiguration();
try {
parser = (OutputParser<K, V>) Class.forName(conf.get("binary.analysis.output.parser")).newInstance();
Expand Down Expand Up @@ -121,7 +121,7 @@ protected void map(Text key, BytesWritable value, Context context)
uuid++;
File binaryFile = new File(dataDir, uuid+fileExtention);
writeToFile(value, binaryFile, context);
substitutionMap.put("file", binaryFile.getName());
substitutionMap.put("file", binaryFile.getPath());

execute(key, value, context);

Expand Down

0 comments on commit 5aebfdf

Please sign in to comment.