public class WARCWritable extends Object implements org.apache.hadoop.io.Writable
WARCRecord implementing the Hadoop Writable interface. This
allows WARC records to be used throughout Hadoop (e.g. written to sequence files when shuffling
data between mappers and reducers). The record is encoded as a single record in standard WARC/1.0
format.| Modifier and Type | Field and Description |
|---|---|
private WARCRecord |
record |
| Constructor and Description |
|---|
WARCWritable()
Creates an empty writable (with a null record).
|
WARCWritable(WARCRecord record)
Creates a writable wrapper around a given WARCRecord.
|
| Modifier and Type | Method and Description |
|---|---|
WARCRecord |
getRecord()
Returns the record currently wrapped by this writable.
|
void |
readFields(DataInput in)
Parses a
WARCRecord out of a DataInput stream, and makes it the writable's
current record. |
void |
setRecord(WARCRecord record)
Updates the record held within this writable wrapper.
|
void |
write(DataOutput out)
Appends the current record to a
DataOutput stream. |
private WARCRecord record
public WARCWritable()
public WARCWritable(WARCRecord record)
public WARCRecord getRecord()
public void setRecord(WARCRecord record)
public void write(DataOutput out) throws IOException
DataOutput stream.write in interface org.apache.hadoop.io.WritableIOExceptionpublic void readFields(DataInput in) throws IOException
WARCRecord out of a DataInput stream, and makes it the writable's
current record.readFields in interface org.apache.hadoop.io.WritableIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.