|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapreduce.RecordWriter<org.apache.avro.mapred.AvroKey<T>,org.apache.hadoop.io.NullWritable> org.apache.crunch.io.avro.trevni.TrevniRecordWriter<T>
public class TrevniRecordWriter<T>
Field Summary | |
---|---|
static String |
EXT
trevni file extension |
protected org.apache.trevni.ColumnFileMetaData |
meta
meta data to be stored in the output file. |
static String |
META_PREFIX
prefix of job configs that we care about |
protected int |
part
Counter that increments as new trevni files are create because the current file has exceeded the block size |
protected org.apache.avro.Schema |
schema
Provided avro schema from the context |
protected org.apache.trevni.avro.AvroColumnWriter<T> |
writer
Trevni file writer |
Constructor Summary | |
---|---|
TrevniRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
|
Method Summary | |
---|---|
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext arg0)
|
void |
flush()
A Trevni flush will close the current file and prep a new writer |
protected org.apache.avro.Schema |
initSchema(org.apache.hadoop.mapreduce.TaskAttemptContext context)
|
void |
write(org.apache.avro.mapred.AvroKey<T> key,
org.apache.hadoop.io.NullWritable value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EXT
public static final String META_PREFIX
protected int part
protected org.apache.trevni.avro.AvroColumnWriter<T> writer
protected org.apache.avro.Schema schema
protected org.apache.trevni.ColumnFileMetaData meta
Constructor Detail |
---|
public TrevniRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
IOException
Method Detail |
---|
public void write(org.apache.avro.mapred.AvroKey<T> key, org.apache.hadoop.io.NullWritable value) throws IOException, InterruptedException
write
in class org.apache.hadoop.mapreduce.RecordWriter<org.apache.avro.mapred.AvroKey<T>,org.apache.hadoop.io.NullWritable>
IOException
InterruptedException
protected org.apache.avro.Schema initSchema(org.apache.hadoop.mapreduce.TaskAttemptContext context)
public void flush() throws IOException
IOException
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext arg0) throws IOException, InterruptedException
close
in class org.apache.hadoop.mapreduce.RecordWriter<org.apache.avro.mapred.AvroKey<T>,org.apache.hadoop.io.NullWritable>
IOException
InterruptedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |