Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Initial attempts at custom SDF output formats

  • Loading branch information...
commit e1d78ebcfa3c4a5277205f2fd7db0112fbe7a10d 1 parent afa1990
Rajarshi Guha authored
16 CDKPersonal/rghadoop/src/net/rguha/dc/io/SDFOutputFormat.java
... ... @@ -0,0 +1,16 @@
  1 +package net.rguha.dc.io;
  2 +
  3 +import org.apache.hadoop.io.LongWritable;
  4 +import org.apache.hadoop.io.Text;
  5 +import org.apache.hadoop.mapreduce.RecordWriter;
  6 +import org.apache.hadoop.mapreduce.TaskAttemptContext;
  7 +import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
  8 +
  9 +import java.io.IOException;
  10 +
  11 +
  12 +public class SDFOutputFormat extends TextOutputFormat {
  13 + public RecordWriter getRecordWriter(TaskAttemptContext taskAttemptContext) throws IOException, InterruptedException {
  14 + return new SDFRecordWriter<LongWritable,Text>();
  15 + }
  16 +}
20 CDKPersonal/rghadoop/src/net/rguha/dc/io/SDFRecordWriter.java
... ... @@ -0,0 +1,20 @@
  1 +package net.rguha.dc.io;
  2 +
  3 +import org.apache.hadoop.mapreduce.RecordWriter;
  4 +import org.apache.hadoop.mapreduce.TaskAttemptContext;
  5 +
  6 +import java.io.IOException;
  7 +
  8 +public class SDFRecordWriter<LongWritable,Text> extends RecordWriter<LongWritable, Text> {
  9 + public SDFRecordWriter() {
  10 + }
  11 +
  12 + public void write(LongWritable text, Text text1) throws IOException {
  13 +// TextOutputFormat.LineRecordWriter lrw;
  14 + //To change body of implemented methods use File | Settings | File Templates.
  15 + }
  16 +
  17 + public void close(TaskAttemptContext taskAttemptContext) throws IOException, InterruptedException {
  18 + //To change body of implemented methods use File | Settings | File Templates.
  19 + }
  20 +}

0 comments on commit e1d78eb

Please sign in to comment.
Something went wrong with that request. Please try again.