-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #478 from dieu/apanasenko/writebale_seq_with_combined
Added CombinedWritableSequenceFile to cascading2
- Loading branch information
Showing
2 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...rc/main/java/com/twitter/elephantbird/cascading2/scheme/CombinedWritableSequenceFile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.twitter.elephantbird.cascading2.scheme; | ||
|
||
import org.apache.hadoop.io.Writable; | ||
import org.apache.hadoop.mapred.JobConf; | ||
import org.apache.hadoop.mapred.OutputCollector; | ||
import org.apache.hadoop.mapred.RecordReader; | ||
|
||
import cascading.flow.FlowProcess; | ||
import cascading.scheme.hadoop.WritableSequenceFile; | ||
import cascading.tap.Tap; | ||
import cascading.tuple.Fields; | ||
|
||
public class CombinedWritableSequenceFile extends WritableSequenceFile { | ||
public CombinedWritableSequenceFile(Fields fields, Class<? extends Writable> valueType) { | ||
super(fields, valueType); | ||
} | ||
|
||
public CombinedWritableSequenceFile(Fields fields, Class<? extends Writable> keyType, Class<? extends Writable> valueType) { | ||
super(fields, keyType, valueType); | ||
} | ||
|
||
@Override | ||
public void sourceConfInit(FlowProcess<JobConf> flowProcess, Tap<JobConf, RecordReader, OutputCollector> tap, JobConf conf) { | ||
super.sourceConfInit(flowProcess, tap, conf); | ||
|
||
CombinedSequenceFile.sourceConfInit(conf); | ||
} | ||
} |